记录Apollo配置时naming-strategy 不起作用

1、在 Hibernate 5中没有hibernate.ejb.naming_strategy不再支持该属性,替换成新的数据1.1:hibernate.physical_naming_strate

1、在 Hibernate 5中没有hibernate.ejb.naming_strategy不再支持该属性,替换成新的数据

1.1:hibernate.physical_naming_strategy

1.2:hibernate.implicit_naming_strategy

2、在常用的springboot配置或Apollo配置中如果需要实现jpa的对象到数据库字段的自动转换应用最多的是hibernate.physical_naming_strategy属性配置如下:

hibernate.physical_naming_strategy:常用的2个参数

org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy

org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

3、在实际应用过程中我在Apollo中配置成如下配置时:

spring.jpa.hibernate.naming.physical-strategy = org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

系统字段如法进行转换:

修改成:

spring.jpa.hibernate.naming.physical-strategy = org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy

 后系统启动正常了,不再报错

 

当前也不是特清楚上述2个具体有什么区别,有知道的大神。能解释下没

发布者:admin,转转请注明出处:http://www.yc00.com/web/1754913954a5214841.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信