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,280
  • 7
  • 39
  • 81

1 Answers1

2

change to:

spring.jpa.hibernate.ddl-auto=update

read: Spring boot ddl auto generator

Dmitry Krivolap
  • 1,134
  • 8
  • 16