@Cachebale not working with Ehcache and spring MVC Ehcache not working with Spring Caching Annotation

随声附和 提交于 2019-12-06 16:44:45

In your xml configuration, you need to add

<cache:annotation-driven />

so that spring pick @Cacheable annotation.

See https://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/cache/annotation/EnableCaching.html for more information.

@EnableCaching and <cache:annotation-driven/> are responsible for registering the necessary Spring components that power annotation-driven cache management, such as the CacheInterceptor and the proxy- or AspectJ-based advice that weaves the interceptor into the call stack when @Cacheable methods are invoked.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!