I'm getting the UnsatisfiedDependencyException exception when starting my SpringBoot Application, my main class has these annotations
@SpringBootApplication
@ComponentScan(basePackages = { "com.xxx.yyy" })
@EntityScan("com.xxx.zzzz")
public class App {
}
My entities annotated with @Entity were included as external jars to classpath, my repository class has the @Repository annotation
@Repository
public interface ClassRepository extends JpaRepository<XXX, BigInteger> {
}
My entity is declared as
@Entity
@Table(name = "MyTable")
public class MyEntityClass implements Serializable {
}
The follow is part of the stacktrace
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'XXXController': Unsatisfied dependency expressed through field 'repositoryXXX';
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'xxxRepository': Invocation of init method failed;
nested exception is java.lang.IllegalArgumentException: Not a managed type: class com.xxx.yyy.zzz.entities.MyClass