| 2018.4.22 | JPA |
使用SpringBoot配置JPA数据的时候,根据数据库生成实体,查询的时候,会发现数据库的taskCode字段,在show-sql的时候,变成task_code,要不自动转换,则需要手动配置如下
spring:
jpa:
database: sql-server
show-sql: true
hibernate:
naming:
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
properties:
hibernate:
dialect: org.hibernate.dialect.SQLServerDialect
更新列表:
*
参考文章:
[2]: