spring-guides / gs-accessing-data-mysql

Accessing data with MySQL :: Learn how to set up and manage user accounts on MySQL and how to configure Spring Boot to connect to it at runtime.

Home Page:http://spring.io/guides/gs/accessing-data-mysql/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpringBoot Failed to Start Due to EntityManagerFactory

jabagain opened this issue · comments

Cloned this project and import the complete project into my eclipse and run exactly as is except for the DB credentials but the application failed to start because it was looking for entityManagerFactory.

Description:
Field userRepository in hello.MainController required a bean named 'entityManagerFactory' that could not be found.

Action:

Consider defining a bean named 'entityManagerFactory' in your configuration.

I missed to see the other thread with the same issue as I have- it was closed already and just followed the solution provided which is to clear out the m2 cache and it did work for me. The solution is a bit odd but it worked.