admin管理员组文章数量:1794759
SpringBoot hibernate中配置hibernate命名策略不起作用spring.jpa.hibernate.naming.strategy=org.hibernate.cfg.***
springBoot hibernate中配置hibernate命名策略不起作用(spring.jpa.hibernate.naming.strategy=org.hibernate.cfg.ImprovedNamingStrategy) 首先,出现这种情况的时候看一下IDE工具代码提示是否出现该配置过时错误(碰到这种情况,一般都是版本应用不正确导致的)如图 从图中就可以看出, spring.jpa.hibernate.naming.strategy=org.hibernate.cfg.ImprovedNamingStrategy 的配置不适用,如果有这种情况,建议先看一下自己spring boot的data-jpa启动器里面的hibernate版本。
没有错的话,使用的版本是hibernate5,但是该使用属于hibernate4的范围,在hibernate5中已经不再适用。但是hibernate5也提供了代替的方法,方法如图 用这两个属性配置替换即可实现功能 spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyComponentPathImpl spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl本文标签: 不起作用策略springhibernateSpringBoot
版权声明:本文标题:SpringBoot hibernate中配置hibernate命名策略不起作用spring.jpa.hibernate.naming.strategy=org.hibernate.cfg.*** 内容由林淑君副主任自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.xiehuijuan.com/baike/1686592166a85369.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论