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