这是出现的问题:

A component required a bean named 'entityManagerFactory’ that could not be found.解决方法(亲测有效)

解决方法如下:

1.先看一下你的user settings file路径在哪里,因为每个人的存放路径可能不一样
A component required a bean named 'entityManagerFactory’ that could not be found.解决方法(亲测有效)
2.然后去找到C:\Users\Administrator.m2\repository\org\hibernate(刚刚已经说过了每个人的存放路径可能不一样,所以不要无脑copy哦),里面的文件如图:
A component required a bean named 'entityManagerFactory’ that could not be found.解决方法(亲测有效)
3.先把hibernate-core文件拷贝出一个副本,然后再将其删除,避免内容丢失之后不好恢复
A component required a bean named 'entityManagerFactory’ that could not be found.解决方法(亲测有效)
拷贝好之后的亚子:
A component required a bean named 'entityManagerFactory’ that could not be found.解决方法(亲测有效)
最后再去运行你的项目就ok啦!

相关文章: