org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'jpaMappingContext of the solution

Error Background:
Migrating before use Eclipse project to Idea Blog written above. Ecilpse project has been no problem.

Error Analysis:
The reason the project is dependent on the introduction of jpa, in addition to the Idea of intelligence also has a relationship

Solution:

First, add the following class start code is annotated

@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class,JpaRepositoriesAutoConfiguration.class,HibernateJpaAutoConfiguration.class})

Second, maven rely exclude the dependency (although removed in pom.xml, but do not forget there are characteristics depend maven passed)

Reference solution links (to find solutions stackoverflow above):
https://stackoverflow.com/questions/40738818/illegalargumentexception-at-least-one-jpa-metamodel-must-be-present

Guess you like

Origin www.cnblogs.com/youcong/p/11967296.html