Ehcache在 spring中的配置

<bean id="alpEhCacheManager" class="com.alibaba.alp.biz.cache.EhCacheManagerImpl">
		<property name="version" value="${alp.cache.service.version}" />
		<property name="ehcache" ref="alpEhCache" />
		<property name="monitorClient" ref="monitorClient" />
	</bean>

	<bean id="alpEhCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
		<property name="cacheManager">
			<ref local="cacheManager" />
		</property>
		<property name="cacheName">
			<value>ALP_EHCACHE_AREA</value>
		</property>
	</bean>

	<!-- 引用ehCache的配置 -->
	<bean id="cacheManager"
		class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
		<property name="configLocation">
			<value>classpath:config/alp-ehcache.xml</value>
		</property>

猜你喜欢

转载自trent-luo.iteye.com/blog/1098272