第2.1.1章 WEB系统最佳实践Spring文件配置之spring-cache.xml
2016-10-24 13:11
736 查看
spring-cache.xml中主要是利用spring cache缓存模块,整合第三方缓存插件,例如下方即是整合了ehcache。
<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cache="http://www.springframework.org/schema/cache" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/cache http://www.springframework.org/schema/cache/spring-cache.xsd" default-lazy-init="false"> <description>Spring缓存配置</description> <bean id="springCacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager"> <property name="cacheManager" ref="ehcacheManager"/> </bean> <!--ehcache--> <bean id="ehcacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> <property name="configLocation" value="classpath:properties/ehcache.xml"/> </bean> <cache:annotation-driven cache-manager="springCacheManager" /> </beans>
相关文章推荐
- 第2.1.9章 WEB系统最佳实践Spring文件配置之spring-dubbo.xml
- 第2.1.5章 WEB系统最佳实践Spring文件配置之spring-mvc.xml
- 第2.1.6章 WEB系统最佳实践Spring文件配置之spring-hessian-client.xml
- 第2.1.2章 WEB系统最佳实践Spring文件配置之spring-common.xml
- 第2.1.7章 WEB系统最佳实践Spring文件配置之spring-shiro.xml
- 第2.1.3章 WEB系统最佳实践Spring文件配置之spring-dao.xml
- 第2.1.4章 WEB系统最佳实践Spring文件配置之spring-hessian-server.xml
- 第2.1.8章 WEB系统最佳实践Spring文件配置之spring-email.xml
- 第2.1.10章 WEB系统最佳实践Spring文件配置多数据源
- 第2.1章 WEB系统最佳实践Spring文件配置
- Spring的XML配置文件的十二个最佳方法实践
- 第2.3.1章 WEB系统最佳实践属性配置之ehcache.xml
- Spring的XML配置文件的十二个最佳方法实践
- spring配置文件路径修改后web.xml配置
- web.xml文件中配置(servlet, spring, filter, listenr)的加载顺序 研究
- Spring中XML配置文件的十二个最佳方法
- spring配置文件路径修改后web.xml配置
- Spring 总结用XML配置的十二个最佳实践
- spring的配置文件在web.xml中加载的方式
- web.xml文件中配置( listenr, filter,servlet, spring)的加载顺序 研究(转)