When working with SQL-based databases in Spring Boot, it is helpful to put the following line in your
This will output the SQL statements to the log so that you can see what is going on. This is particularly useful when the various middleware layers are doing the SQL statements for you, and for example, you aren’t even entirely sure what the names of the SQL tables are.
Initial Values in Database
You can seed your database with some initial values. This can be helpful especially during development and debugging phases.
data.sql can be placed in
src/main/resources and has a syntax like this:
INSERT INTO course_offering (course,quarter,instructor) VALUES ('CMPSC 56','F19','Conrad'); INSERT INTO tutor (fname,lname,email) VALUES ('Scott','Chow','email@example.com');