JPA-SpringData-不能有效生成表结构的情况

7次阅读

共计 428 个字符,预计需要花费 2 分钟才能阅读完成。

Spring Boot 项目的使用中,JPA 是我阅读其他项目时学习的框架,当时觉得比 MyBatis 感觉要简便的多,容易快速开发,所以再一次选择了它。
第二次配置并没有像第一次那么顺利,我强行的将应该在 application.properties 里的配置转移到了 application.yml 中,但是事实证明,启动时会提示 "xxx config coudn't find",然后改回在application.properties 里的配置就好了。
一般的配置如下:

# JPA
spring.jpa.show-sql=true
spring.jpa.properties.jadira.usertype.autoRegisterUserTypes=true
spring.jpa.hibernate.ddl-auto=update
spring.jpa.hibernate.generate-ddl=true
spring.jpa.hibernate.open-in-view=true

正文完
 0