Java &引用;您已经在存储库中定义了查询方法,但没有';“没有定义任何查询查找策略”;在Spring启动版本更新之后

Java &引用;您已经在存储库中定义了查询方法,但没有';“没有定义任何查询查找策略”;在Spring启动版本更新之后,java,spring,spring-boot,couchbase,Java,Spring,Spring Boot,Couchbase,当尝试将我们的Spring Boot应用程序从verions2.0.4.RELEASE升级到版本2.1.6.RELEASE时,我们在应用程序启动期间遇到以下错误: Caused by: java.lang.IllegalStateException: You have defined query method in the repository but you don't have any query lookup strategy defined. The infrastructure app

当尝试将我们的
Spring Boot
应用程序从verions
2.0.4.RELEASE
升级到版本
2.1.6.RELEASE
时,我们在应用程序启动期间遇到以下错误:

Caused by: java.lang.IllegalStateException: You have defined query method in the repository but you don't have any query lookup strategy defined. The infrastructure apparently does not support query methods!
at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:545)
at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:324)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$5(RepositoryFactoryBeanSupport.java:297)
at org.springframework.data.util.Lazy.getNullable(Lazy.java:211)
at org.springframework.data.util.Lazy.get(Lazy.java:94)
at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:300)
at org.springframework.data.couchbase.repository.support.CouchbaseRepositoryFactoryBean.afterPropertiesSet(CouchbaseRepositoryFactoryBean.java:105)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774)
原因:java.lang.IllegalStateException:您已在存储库中定义了查询方法,但未定义任何查询查找策略。基础设施显然不支持查询方法!
位于org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor。(RepositoryFactorySupport.java:545)
位于org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:324)
位于org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$5(RepositoryFactoryBeanSupport.java:297)
位于org.springframework.data.util.Lazy.getNullable(Lazy.java:211)
位于org.springframework.data.util.Lazy.get(Lazy.java:94)
位于org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertieSet(RepositoryFactoryBeanSupport.java:300)
位于org.springframework.data.couchbase.repository.repository.factorybean.afterPropertiesSet(CouchbaseRepositoryFactoryBean.java:105)
位于org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1837)
位于org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1774)
我们有一个Couchbase DB,下面是Repository类:

public interface CatRepository extends CouchbaseRepository<Cat, String>{
  Cat findByOwnerNameAndCityName(String ownerName, String cityName);
  List<Cat> findAllByOwnerNameOrderByCityName(String ownerName);
  List<Cat> findAllByLoveToEatNotLike(String food);
}
公共接口CatRepository扩展CouchbaseRepository{
Cat FindByownerNamedCityName(字符串ownerName,字符串cityName);
列出findAllByOwnerNameOrderByCityName(字符串ownerName);
列出findAllByLoveToEatNotLike(串食物);
}
我们发现了最终导致版本降级的问题


我们还发现,这涉及到项目中没有的
Flux

请添加您的pom或gradle构建文件,以便我们可以检查您的依赖关系。请添加您的pom或gradle构建文件,以便我们可以检查您的依赖关系。