我的表数据被删除,当我重新启动我的Spring Boot 应用程序后,改变了“Spring.jpa.hibernate.ddl-auto”的值“创建”从“验证”.为什么会这样?我应该做什么来找回我的数据?我可以看到一些删除查询在我的IDE控制台执行。为什么会发生?有人能解释一下吗?
tnkciper1#
在application.properties中进行以下更改spring.jpa.hibernate.ddl-auto=none
hivapdat2#
你可以阅读spring-boot的官方文档,该属性在hibernate配置中与hibernate.hbm2ddl.auto相关。
hibernate.hbm2ddl.auto
k3fezbri3#
更改表名:
@Entity @Table(name = "hms_pinlocator")
字符串
3条答案
按热度按时间tnkciper1#
在application.properties中进行以下更改
spring.jpa.hibernate.ddl-auto=none
hivapdat2#
你可以阅读spring-boot的官方文档,该属性在hibernate配置中与
hibernate.hbm2ddl.auto
相关。k3fezbri3#
更改表名:
字符串