大佬教程收集整理的这篇文章主要介绍了SpringBoot 1.3.0是否支持休眠5?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
您可以在Spring Boot 1.3中使用Hibernate 4.3或Hibernate 5.0。如您所见,Hibernate 4.3.x是默认版本。
要使用Hibernate 5.0,您应该hibernate.version
在Spring Boot的依赖管理中覆盖该属性。假设您正在使用Maven:
<propertIEs>
<hibernate.version>5.0.5.Final</hibernate.version>
</propertIEs>
使用Hibernate 5.0时,与使用Hibernate 4.3.x的最大不同是您将失去Spring Boot的自定义命名策略。由于Hibernate 5.0中所做的重大更改,您将在启动时看到类似以下的警告记录:
2015-12-07 10:04:56.911 WARN 81371 --- [ main] org.hibernate.orm.deprecation : HHH90000006: Attempted to specify unsupported NamingStrategy via setTing [hibernate.ejb.naming_strategy]; NamingStrategy has been removed in favor of the split ImplicitNamingStrategy and PhysicalNamingStrategy; use [hibernate.implicit_naming_strategy] or [hibernate.physical_naming_strategy], respectively, instead.
如果您不喜欢Hibernate
5的默认设置,则可以分别application.propertIEs
使用spring.jpa.propertIEs.hibernate.implicit_naming_strategy
和spring.jpa.propertIEs.hibernate.physical_naming_strategy
属性在Spring
Boot中指定自定义的隐式或物理命名策略。
以上是大佬教程为你收集整理的SpringBoot 1.3.0是否支持休眠5?全部内容,希望文章能够帮你解决SpringBoot 1.3.0是否支持休眠5?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。