Hi, I'm trying to set up for the first time but am getting the following error:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.cesicorp.magrathea.repository.UserRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1506) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1101) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:818) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:724) ... 36 common frames omitted
Hi, I'm trying to set up for the first time but am getting the following error:
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.cesicorp.magrathea.repository.UserRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {} at org.springframework.beans.factory.support.DefaultListableBeanFactory.raiseNoMatchingBeanFound(DefaultListableBeanFactory.java:1506) at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1101) at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062) at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:818) at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:724) ... 36 common frames omitted
Using spring-data-jpa version 2.0.9.RELEASE as seen here:
[INFO] +- org.springframework.boot:spring-boot-loader-tools:jar:2.0.4.RELEASE:compile [INFO] | \- org.apache.commons:commons-compress:jar:1.14:compile [INFO] +- org.springframework.boot:spring-boot-starter-actuator:jar:2.0.4.RELEASE:compile [INFO] | \- io.micrometer:micrometer-core:jar:1.0.6:compile [INFO] | +- org.hdrhistogram:HdrHistogram:jar:2.1.10:compile [INFO] | \- org.latencyutils:LatencyUtils:jar:2.0.3:compile [INFO] +- org.springframework.boot:spring-boot-starter-aop:jar:2.0.4.RELEASE:compile [INFO] | \- org.aspectj:aspectjweaver:jar:1.8.13:compile [INFO] +- org.springframework.boot:spring-boot-starter-data-jpa:jar:2.0.4.RELEASE:compile [INFO] | +- org.springframework.boot:spring-boot-starter-jdbc:jar:2.0.4.RELEASE:compile [INFO] | | \- org.springframework:spring-jdbc:jar:5.0.8.RELEASE:compile [INFO] | +- javax.transaction:javax.transaction-api:jar:1.2:compile [INFO] | +- org.springframework.data:spring-data-jpa:jar:2.0.9.RELEASE:compile
And using spring-data-jpa-entity-graph version 2.0.7.
I applied @EnableJpaRepositories(repositoryFactoryBeanClass = EntityGraphJpaRepositoryFactoryBean.class)
And this is my UserRepository: ` @Repository public interface UserRepository extends EntityGraphJpaRepository<User, Long> {
} `
I would greatly appreciate any insight you might have.