SpringBoot H2 Database loosing data in the every execute

Viewed 152

I connected to h2 database and i'm posting the entity while using postman. But I loose the data everytime when I rerun the my code.

      spring.h2.console.enabled=true
      spring.datasource.url = jdbc:h2:mem:crm/db_;DB_CLOSE_DELAY=-1
      spring.datasource.driver-class-name=org.h2.Driver
      spring.datasource.username=sa
      spring.datasource.password=
      spring.jpa.show-sql=true
      spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.H2Dialect
      spring.jpa.hibernate.ddl-auto=update

Is there anyway to storage data in H2Database?

1 Answers
Related