springboot整合springdatajpa时jar冲突


1.springboot整合springdatajpa测试时报No bean named 'entityManagerFactory' available错误

2.运行springboot主程序时报以下错误

***************************
APPLICATION FAILED TO START
***************************
Description:
Field userRepository in com.sweng.giflib.service.UserServiceImpl required a bean named 'entityManagerFactory' that could not be found.
Action:
Consider defining a bean named 'entityManagerFactory' in your configuration.

原因:hibernate和jpa的jar包冲突了

解决方案:把repository\org\hibernate的版本号删除之后,再updata project,重新编译运行即可


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM