SpringBoot出现a bean named entityManagerFactory that could not be found
-
具体错误
1
a bean named 'entityManagerFactory' that could not be found
-
原因:maven中依赖导入的包可能和其他jar包冲突
-
解决方法:
1
2
3
4
5
6<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<version>RELEASE</version>
<scope>compile</scope>
</dependency>把上述version一栏去掉,变为
1
2
3
4
5<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<scope>compile</scope>
</dependency>
本博客所有文章除特别声明外,均采用 CC BY-NC-SA 4.0 许可协议。转载请注明来自 515code-实验室!
评论