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个小时。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM