http://xiangai.taobao.com
http://shop148612228.taobao.com

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 来源:简书 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。
posted @ 2020-04-17 14:35  万事俱备就差个程序员  阅读(3633)  评论(0)    收藏  举报

http://xiangai.taobao.com
http://shop148612228.taobao.com
如果您觉得对您有帮助.领个红包吧.谢谢.
支付宝红包
微信打赏 支付宝打赏