No cache could be resolved for……. At least one cache should be provided per cache operation

Posted woyujiezhen

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了No cache could be resolved for……. At least one cache should be provided per cache operation相关的知识,希望对你有一定的参考价值。

报错:No cache could be resolved for ‘Builder[public abstract com.example.cache.generate.Department com.example.cache.generate.DepartmentDao.selectByPrimaryKey(java.lang.Integer)] caches=[] | key=‘‘ | keyGenerator=‘‘ | cacheManager=‘‘ | cacheResolver=‘‘ | condition=‘‘ | unless=‘‘ | sync=‘false‘‘ using resolver ‘org.springframework.cache.interceptor.SimpleCacheResolver@4c504095‘. At least one cache should be provided per cache operation.

本来@EnableCaching+@Cacheable(cacheNames={"xx"})就行了,结果……

我的天,我一直在实现类里面找错误,结果最后发现是我在接口写了一个@Cacheable忘记删除了。难受,浪费2个小时。

以上是关于No cache could be resolved for……. At least one cache should be provided per cache operation的主要内容,如果未能解决你的问题,请参考以下文章

No cache manager could be auto-configured, check your configuration (caching type is ‘CAFFEINE‘)

No cache manager could be auto-configured, check your configuration (caching type is ‘CAFFEINE‘)

No cache manager could be auto-configured, check your configuration (caching type is ‘CAFFEINE‘)(代码片

SQLyog连接报错 Error No.2058 Plugin caching_sha2_password could not be loaded

远程连接mysql8.0,Error No.2058 Plugin caching_sha2_password could not be loaded

The following artifacts could not be resolved(jenkins打包报错)