Skip to content

houdini68/spring_boot_recipes

Repository files navigation

Spring Boot Recipes

Introduction

Rudy Vissers does implement recipes on the Spring Framework/Spring Boot/JPA apis/Hibernate/... Have a lot of fun!

Starting the app (H2 or Postgresql)

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'

Q&A

How to start the Docker Postgresql server?

docker run -p 5432:5432 sb2r-postgres https://stackoverflow.com/a/25293929/757695

About

Spring Boot recipes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages