java - persistence.xml:hibernate.hbm2ddl.auto=create-drop 不工作
问题描述
我的应用程序中的 create-drop 有问题。
在 persistence.xml 文件中,我有一行:
<property name="hibernate.hbm2ddl.auto=create-drop" value="create-drop"/>
但是每次我重新启动我的应用程序时 hibernate_sequence 都不会重置。如何解决?
解决方案
正确的命名是:
<property name="hibernate.hbm2ddl.auto" value="create-drop"/>
属性名称是hibernate.hbm2ddl.auto
而不是hibernate.hbm2ddl.auto=create-drop