Populating some data

To be able to test the repositories that we will create, we will populate some test data into these tables. All that we need to do is include the file called data.sql with the following statements in src\main\resources:

insert into user (id, name, userid) values (1, 'User Name 1', 'UserId1');insert into user (id, name, userid) values (2, 'User Name 2', 'UserId2');insert into user (id, name, userid) values (3, 'User Name 3', 'UserId3');insert into user (id, name, userid) values (4, 'User Name 4', 'UserId4');insert into todo (id, title, description, is_done, target_date, userid) values (101, 'Todo Title 1', 'Todo Desc 1', false, CURRENT_DATE(), 1);insert into todo (id, title, description, is_done, target_date, userid)

Get Mastering Spring 5.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.