in org.springframework.cache.annotation.ProxyCachingConfiguration required a bean of type 'org.springframework.cache.interceptor.CacheOperationSource' that could not be found

发布时间 2023-11-02 10:46:57作者: 不忘初心2021

我的项目是springboot项目,在启动过程中报错如何下

Parameter 0 of method cacheAdvisor in org.springframework.cache.annotation.ProxyCachingConfiguration 
required a bean of type 'org.springframework.cache.interceptor.CacheOperationSource' 
that could not be found

  这个可以理解为缓存得到问题,标记了缓存,但是没有实际实例化的地方和使用的位置

我的启动是用了@EnableCaching,但是对应配套的注解,@Cacheable,@CachePut,@CacheEvict没有对应的搭配使用,因为

我去了解了项目,其实没用到这个缓存技术的,所以我去掉了@EnableCaching