Spring Data JPA - Consider defining a bean named 'entityManagerFactory' in your configuration

后端 未结 9 2178
一个人的身影
一个人的身影 2020-12-29 05:24

I am developing an application in Spring, using Tomcat, Mysql5, Java8... The problem is that I cannot deploy it, due to \"required bean \'entityManagerFactory\' not found\"

相关标签:
9条回答
  • 2020-12-29 05:51

    Be careful with jars dependencies loaded by Maven, in my case hibernate-core.jar was corrupted, once I removed and install that dependency the project runs ok. cheers.

    0 讨论(0)
  • 2020-12-29 05:58

    check that you added @Repository annotation on JpaRepository Check that you make all entity Setter and Getter clean and build then run.

    0 讨论(0)
  • 2020-12-29 06:00

    pom.xml needs to be updated and it works for me:

    I added the following dependency:

        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.3.1</version>
        </dependency>
    
    0 讨论(0)
提交回复
热议问题