要加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 来源:简书 著作权归作者所有。商业转载请联系作者获得授权,非商业转载请注明出处。

相关文章:

  • 2021-06-26
  • 2022-12-23
  • 2021-10-09
  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
  • 2022-02-03
  • 2021-09-16
猜你喜欢
  • 2022-12-23
  • 2022-03-08
  • 2021-04-30
  • 2022-12-23
  • 2021-04-15
  • 2021-11-23
  • 2022-12-23
相关资源
相似解决方案