Spring 3.0.5 MVC 基于注解ehcache.xml 配置
来源:互联网 发布:数据监测系统 编辑:程序博客网 时间:2024/05/16 09:39
Spring 3.0.5 MVC 基于注解ehcache.xml 配置(注意:spring 3.1.X和3.0.X的不一样)
缓存机制,spring 3.0.5 中ehcache配置方法很简单,其中缓存机制很细颗粒化,可以具体到把每个方式的返回值做缓存:
jar包 :cglib-2.2.jar,ehcache-spring-annotations-1.1.2.jar ehcache-2.7.1.jar
web.xml配置
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop" xmlns:context="http://www.springframework.org/schema/context" xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx" xmlns:ehcache="http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring http://ehcache-spring-annotations.googlecode.com/svn/schema/ehcache-spring/ehcache-spring-1.1.xsd">
<!-- Spring 3.0.5 MVC 基于注解ehcache.xml 配置 start--><ehcache:annotation-driven cache-manager="ehCacheManager" /> <bean id="ehCacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"> <property name="configLocation" value="classpath:ehcache.xml" /> </bean> <!-- ehcache.xml 配置 end -->src下新建ehcache.xml
<?xml version="1.0" encoding="UTF-8"?><ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"xsi:noNamespaceSchemaLocation="ehcache.xsd" updateCheck="true"monitoring="autodetect"><!-- <diskStore path="java.io.tmpdir" /> --><diskStore path="E:/cachetmpdir01"/><defaultCache maxElementsInMemory="10000" eternal="false"timeToIdleSeconds="120" timeToLiveSeconds="120" overflowToDisk="true"maxElementsOnDisk="10000000" diskPersistent="false"diskExpiryThreadIntervalSeconds="120" memoryStoreEvictionPolicy="LRU" /><cache name="testCache" maxElementsInMemory="10000"maxElementsOnDisk="1000" eternal="false" overflowToDisk="true"diskSpoolBufferSizeMB="20" timeToIdleSeconds="300" timeToLiveSeconds="600"memoryStoreEvictionPolicy="LFU" /><cache name="andCache" maxElementsInMemory="10000"maxElementsOnDisk="1000" eternal="false" overflowToDisk="true"diskSpoolBufferSizeMB="20" timeToIdleSeconds="300" timeToLiveSeconds="600"memoryStoreEvictionPolicy="LFU" /></ehcache>
- Spring 3.0.5 MVC 基于注解ehcache.xml 配置方式
- Spring 3.0.5 MVC 基于注解ehcache.xml 配置
- Spring 3.0.5 MVC 基于注解ehcache.xml 配置方式
- Spring Web MVC简介 、基于XML配置的MVC应用 、基于注解配置的MVC应用
- SPRINGMYBATIS01 Unit03: Spring Web MVC简介 、 基于XML配置的MVC应用 、 基于注解配置的MVC应用
- Spring基于注解的缓存配置--EHCache AND OSCache
- Spring基于注解的缓存配置--EHCache AND OSCache
- Spring基于注解的缓存配置--EHCache AND OSCache
- Spring基于注解的缓存配置--EHCache AND OSCache
- Spring基于注解的缓存配置--EHCache AND OSCache
- Spring基于注解的缓存配置--EHCache AND OSCache
- Spring MVC中,基于XML配置和基于注解的依赖注入实例
- spring-mvc注解web.xml配置问题
- 基于xml配置的Spring MVC HelloWorld
- spring mvc+mybatis+ spring 基于全注解事务配置
- Spring基于注解ehCache缓存整合
- spring mvc注解配置
- Spring MVC 注解配置
- 第十四周--项目1-Animal
- 寄存器的分配
- 在android中对关系型数据库的操作
- 电容触摸按键固件驱动
- Matlab读取UCI中.data文件
- Spring 3.0.5 MVC 基于注解ehcache.xml 配置
- GIF图片制作原理
- SpiderMonkey学习笔记(4)--实现max()函数
- asp.net mvc 模板页
- sql server 时间1900-01-01
- 简单注册页面的javascript验证代码
- spring dbcp连接池配置
- 海量数据查询优化(精)
- ADXL345 驱动代码