修改EhCacheManagerFactoryBean支持多ehcache.xml配置以及占位符

来源:互联网 发布:seo主管工作内容 编辑:程序博客网 时间:2024/06/03 18:46

源码在这里

spring 配置:

    <bean id="defaultEnCacheManager" class="com.vgerbot.cache.ehcache.VgerbotEhCacheManagerFactoryBean">        <property name="configLocation" value="classpath:ehcache.xml"></property>        <!-- 加载maven module的cache/*.xml缓存配置,最终和上面的ehcache.xml合并成一个文件 -->        <property name="extensionConfigLocation" value="classpath*:cache/*.xml"/>        <property name="shared" value="true"></property>    </bean>    <bean id="defaultCacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager">        <property name="cacheManager" ref="defaultEnCacheManager"/>    </bean>
0 0
原创粉丝点击