Search code examples
javaspring-boothibernate

SpringBoot 3, hibernate 6 tables not created


I'm starting a brand new java project, based on

  • java 17
  • spring boot 3.1 → automatically import hibernate 6.2.2 final
  • querydsl 5.0

I created a table using usual annotation

  • @Table
  • @Entity

the object implements Serializable

but when I start the application, database is not initialized. I obviously put in the application.properties

spring.jpa.hibernate.ddl-auto=update

Application class is on the same package of the model and to be sure I added @EntityScan with root package name, but nothing happened.

I have not any error message, db connection is correctly established

enter image description here

Any suggestion?


Solution

  • Have you configured the below properties properly? as its maybe create an issue while creating an table.

    1. spring.jpa.hibernate.connection.provider_class
    2. spring.jpa.properties.hibernate.dialect
    3. spring.jpa.hibernate.ddl-auto

    please check above and I think it will resolved the issue.