Repository bean not found
See original GitHub issueHi,
I am using spring jpa 2.2.6.RELEASE and spring-data-jpa-entity-graph 2.2.8. I have added @EnableJpaRepositories(repositoryFactoryBeanClass = EntityGraphJpaRepositoryFactoryBean.class) to config class.
Repository bean is Extending EntityGraphJpaRepository<T, Integer>,EntityGraphQuerydslPredicateExecutor<T>.
I have followed all steps as mentiioned in the docs.
JPA Config. ` @Configuration @EnableJpaAuditing(auditorAwareRef = “auditorAware”) @EnableJpaRepositories(repositoryFactoryBeanClass = EntityGraphJpaRepositoryFactoryBean.class) //@EnableJpaRepositories public class JpaConfig {
@Bean
public AuditorAware<String> auditorAware() {
return new AuditorImpl();
}
@Bean
public JPAQueryFactory jpaQueryFactory(EntityManager entityManager)
{
return new JPAQueryFactory(entityManager);
}
} `
Repository:.
`
public interface GeneralRepository<T> extends EntityGraphJpaRepository<T, Integer>,EntityGraphQuerydslPredicateExecutor<T> {
}
`
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Can't Autowire @Repository annotated interface in Spring Boot
Spring test with @DataJpaTest can't autowire class with @Repository (but with interface repository works!) 4 · Could not autowire. No beans of ` ......
Read more >Spring Boot - Fixing Autowire Bean Not found | GyanBlog
Fixing Autowire Bean not found in Spring boot, and application failed to start.
Read more >Spring Data repository is not recognized as bean sometimes
I have a maven based SpringBoot project and I'm using Spring Data JPA. IntelliJ suddenly starts complaining of not being able to find...
Read more >1. Working with Spring Data Repositories
The central interface in Spring Data repository abstraction is Repository (probably not that much of a surprise). It takes the the domain class...
Read more >Autowired cant find repository bean identified with @Repository
I have a Junit test which cant load the a repository bean. The full context is as follows which may be where the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Configuration @EnableJpaRepositories(repositoryFactoryBeanClass = EntityGraphJpaRepositoryFactoryBean.class, basePackages = {“com.dummy.app.repository”}) public class RepositoryConfig { }
The basePackage was missing . Thanks @ylcinyakup .