H2 database In memory - Init schema via Spring/Hibernate

后端 未结 1 1204
刺人心
刺人心 2021-01-03 07:41

I have a Spring/Hibernate application with H2 database and I have a few issues with configuring H2 to run in an embedded mode (in memory):

1. I want spring to start

1条回答
  •  無奈伤痛
    2021-01-03 08:13

    Hibernate has a property called schemaUpdate. Set it on your SessionFactory so that the database is created on initialization.

    
    

    If you are using JPA, then there is a generateDdl property that is to be set on the JpaVendorAdapter

    0 讨论(0)
提交回复
热议问题