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,重新编译运行即可

相关文章:

  • 2022-01-19
  • 2022-12-23
  • 2021-06-08
  • 2021-12-07
  • 2022-01-13
  • 2021-12-09
  • 2022-12-23
  • 2021-11-06
猜你喜欢
  • 2021-05-05
  • 2021-10-30
  • 2022-12-23
  • 2022-12-23
  • 2021-04-08
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案