1

I'm learning Spring Boot and I've created a simple application where I'm connecting to a postgresql database and I perform simple insert/update/delete operations. Everything works fine, but the rows I add on the database does not persist on the DB if I stop the application. Do I have to specify a kind of commit somewhere?
This is the application.properties file:

spring.jpa.database=POSTGRESQL
spring.datasource.platform=postgres
spring.datasource.url=jdbc:postgresql://localhost:5432/testdb
spring.datasource.username=postgres
spring.datasource.password=*pass*
spring.jpa.generate-ddl=true
spring.jpa.hibernate.ddl-auto=create
Usr
  • 2,628
  • 10
  • 51
  • 91

1 Answers1

3

change to:

spring.jpa.hibernate.ddl-auto=update

read: Spring boot ddl auto generator

Dmitry Krivolap
  • 1,354
  • 9
  • 16