At least one cache should be provided per cache operation.


要加cacheNames ;不然报错: java.lang.IllegalStateException: No cache could be resolved for 'Builder[public abstract java.util.List com.test.findByXXX()] caches=[] | key='' | keyGenerator='' | cacheManager='' | cacheResolver='' | condition='' | unless='' | sync='false'' using resolver 'org.springframework.cache.interceptor.SimpleCacheResolver@12fddded'. At least one cache should be provided per cache operation. 解决办法: @Cacheable(cacheNames = {"user","user"},key = "#id") 作者:我想起个好名字 链接:https://www.jianshu.com/p/101704f462e1 来源:简书 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。


免责声明!

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



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