I use spring-boot-starter-data-jpa
for get data from mysql.
When my project structure is (Project.java file is in application package) everything works well, but when I put Project.java entity file to entities package I got bellow exception:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'controller': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.gehive.microservice.data.repositories.ProjectRepository com.gehive.microservice.application.Controller.repo; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'projectRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Not an managed type: class com.gehive.microservice.data.entities.Project
work without exceptions:
if structure like this I got exception: