Skip to content
Advertisement

A bean named ‘entityManagerFactory’ that could not be found

I’m pretty new to Hibernate/JPA. Running the application, I’m getting this error:

JavaScript

The main class (I use @EnableJpaRepositories to let Spring find the repository in other package):

JavaScript

My main entity class:

JavaScript

A repository:

JavaScript

A properties file:

JavaScript

Maven dependencies:

JavaScript

What should I do here?

Advertisement

Answer

I solved this adding the following dependency instead of spring-data-jpa:

JavaScript

After that, I got this exception:

JavaScript

But simply solved it by adding this dependency:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement