Search code examples
javaspringspring-boothibernateddl

Spring boot ddl auto generator


I'm using spring boot with spring.jpa.hibernate.ddl-auto=create, but when application restarted, all tables drops and creates again. Is there some way to avoiding re-creation for already existing tables?


Solution

  • spring.jpa.hibernate.ddl-auto=update
    

    hibernate.ddl-auto should usually not be used in production.