Description
I have followed [2.0 quickstart guide](https://github.com/Cosium/spring-data-jpa-entity-graph/blob/master/doc/MAIN.md,
In my database configuration I had:
@Configuration
@EnableJpaRepositories("com.mypackage.api.repository")
@EnableJpaAuditing(auditorAwareRef = "springSecurityAuditorAware")
@EnableTransactionManagement
@EnableElasticsearchRepositories("com.mypackage.api.repository.search")
public class DatabaseConfiguration {
@Bean
public Hibernate5Module hibernate5Module() {
return new Hibernate5Module();
}
}
Now if I switch:
@EnableJpaRepositories("com.mypackage.api.repository")
to:
@EnableJpaRepositories(repositoryFactoryBeanClass = EntityGraphJpaRepositoryFactoryBean.class)
I than add a new repository:
public interface UserEntityGraphRepository extends EntityGraphJpaRepository<User, Long> {
}
in addition to:
public interface UserRepository extends JpaRepository<User, Long> {
}
I get exception:
java.lang.IllegalStateException: Failed to load ApplicationContext
...
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property findAll found for type User!
If I just replace extends JpaRepository
w/ EntityGraphJpaRepository
, I get:
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'userDetailsService': Unsatisfied dependency expressed through field 'userRepository'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'userRepository': Invocation of init method failed; nested exception is org.springframework.data.mapping.PropertyReferenceException: No property findOne found for type User!