欢迎光临
我的个人博客

ehcache启用注解

头部需要引入

xmlns:cache="http://www.springframework.org/schema/cache"

http://www.springframework.org/schema/cache   
http://www.springframework.org/schema/cache/spring-cache-4.2.xsd
<cache:annotation-driven cache-manager="cacheManager" />

<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager">    
        <property name="cacheManager"  ref="cacheManagerFactory"/>    
</bean>

<bean id="cacheManagerFactory" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">    
        <property name="configLocation"  value="classpath:/ehcache.xml"/>   
</bean>  

转载请标明来源:ibear » ehcache启用注解

分享到:更多 ()

Where there is a will there is a way

我的新浪微博