Rudy Vissers does implement recipes on the Spring Framework/Spring Boot/JPA apis/Hibernate/... Have a lot of fun!
There are several (Intellij) run configurations.
run local (H2 everywhere) and run prod (H2 testing and Postgres)
Tests running on H2.
run local on H2 (Postgresql not needed).
run prod on Postgresql (Postresql up and running in a docker).
Control on the database creation.
The creation of the schema and loading of the data at the starting of the app.
Hibernate doesn't create the database/tables (deactivated).
Flyway commented out (dep and sql files). Could be activated if used.
If Flyway is used, then the schema and the data have to be managed manually.
spring.sql.init.platform=postgre // to be removed
spring.sql.init.mode=always // to be removed
And Flyway to eb activated in pom.xml, profile 'prod'
docker run -p 5432:5432 sb2r-postgres https://stackoverflow.com/a/25293929/757695