microsoft / spring-data-cosmosdb

Access data with Azure Cosmos DB
MIT License
94 stars 64 forks source link

basePackageClasses and basePackages do not work with @EnableDocumentDbRepositories #355

Open markusgulden opened 5 years ago

markusgulden commented 5 years ago

If I have my config class and repository interface in different packages, Spring does not find the repository, even if I set basePackageClasses or basePackages with the @EnableDocumentDbRepositories annotation:

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'de.margul.awstutorials.springcloudfunction.azure.repository.CosmosDemoEntityRepository' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

If I put config and repository interface in the same interface, it works perfectly.