springMVC + ehcache @Cacheabale failure

Disclaimer: This article is a blogger original article, shall not be reproduced without the bloggers allowed. https://blog.csdn.net/QWERTY1994/article/details/88681477

These days do caches found @Cacheable useless, as there is no change in the configuration used before, but before using a spring + ehcache, then transplanted into springMVC when not in effect since! If found, then spring-mvc.xml and spring-ehcache, xml separate configuration

The following notes must be in both profiles are plus

<cache:annotation-driven/> 


所以,如果Spring 和 Spring MVC的配置文件是分开的,最好把<cache:annotation-driven/>在两边都加上。

 

Guess you like

Origin blog.csdn.net/QWERTY1994/article/details/88681477