- 浏览: 1474038 次
- 性别:
- 来自: 深圳
文章分类
- 全部博客 (798)
- struts2 (42)
- servlet (20)
- quartz (4)
- jquery & ajax (24)
- tomcat (5)
- javascript (15)
- struts1 (8)
- 搜索关键字及链接 (3)
- fckeditor (3)
- Apache (5)
- spring (22)
- linux (3)
- 企业应用 (8)
- 综合应用 (13)
- 服务器 (2)
- 数据库 (85)
- 性能调优 (21)
- 网络应用 (15)
- 缓存技术 (8)
- 设计模式 (39)
- 面试题 (7)
- 程序人生&前辈程序员 (29)
- java基础 (59)
- hibernate (75)
- log4j (4)
- http (11)
- 架构设计 (28)
- 网页设计 (12)
- java邮件 (4)
- 相关工具 (11)
- ognl (7)
- 工作笔记 (18)
- 知识面扩展 (12)
- oracle异常 (1)
- 正则表达式 (2)
- java异常 (5)
- 项目实践&管理 (1)
- 专业术语 (11)
- 网站参考 (1)
- 论坛话题 (2)
- web应用 (11)
- cxf&webservice (22)
- freemarker (3)
- 开源项目 (9)
- eos (1)
- ibatis (6)
- 自定义标签 (3)
- jsp (3)
- 内部非公开文档(注意:保存为草稿) (0)
- 国内外知名企业 (2)
- 网店 (3)
- 分页 (1)
- 消费者习惯 (2)
- 每日关注 (1)
- 商业信息 (18)
- 关注商业网站 (1)
- 生活常识 (3)
- 新闻 (2)
- xml&JSON (5)
- solaris (1)
- apache.common (3)
- BLOB/CLOB (1)
- lucene (2)
- JMS (14)
- 社会进程 (8)
- SSH扩展 (2)
- 消费心理 (1)
- 珠三角 (1)
- 设计文档 (1)
- XWork&webwork (1)
- 软件工程 (3)
- 数据库及链接 (1)
- RMI (2)
- 国内外知名企业&人物 (1)
最新评论
-
司c马:
简介易懂、
OutputStream和InputStream的区别 -
在世界的中心呼喚愛:
解决我的问题
Java获取客户端的真实IP地址 -
bo_hai:
都是些基本的概念呀!
SSO -
tian_4238:
哥们,你也是搞水利这块的吧。
巧用SQLQuery中的addScalar -
loveEVERYday:
java.util.Date、java.sql.Date、java.sql.Time、java.sql.Timestamp小结
Spring中AOP实现EHCache的整合(一)
- 博客分类:
- 缓存技术
在项目中使用缓存我OSCache,今天有时间将所有的EHCache的缓存的应用关注一下。首先我们看看Spring和EHCache采用AOP实现的缓存实现。
1.首先使用EHCache编写EHCache的配置文件。
- <ehcache>
- <diskStore path="java.io.tmpdir" />
- <defaultCache maxElementsInMemory="10000" eternal="false"
- timeToIdleSeconds="2" timeToLiveSeconds="5" overflowToDisk="true"
- maxElementsOnDisk="10000000" diskPersistent="false"
- diskExpiryThreadIntervalSeconds="120" memoryStoreEvictionPolicy="LRU" />
- <cache name="testCache" maxElementsInMemory="10000"
- maxElementsOnDisk="1000" eternal="false" overflowToDisk="false"
- diskSpoolBufferSizeMB="20" timeToIdleSeconds="60" timeToLiveSeconds="3600"
- memoryStoreEvictionPolicy="LFU" />
- </ehcache>
<ehcache>
<diskStore path="java.io.tmpdir" />
<defaultCache maxElementsInMemory="10000" eternal="false"
timeToIdleSeconds="2" timeToLiveSeconds="5" overflowToDisk="true"
maxElementsOnDisk="10000000" diskPersistent="false"
diskExpiryThreadIntervalSeconds="120" memoryStoreEvictionPolicy="LRU" />
<cache name="testCache" maxElementsInMemory="10000"
maxElementsOnDisk="1000" eternal="false" overflowToDisk="false"
diskSpoolBufferSizeMB="20" timeToIdleSeconds="60" timeToLiveSeconds="3600"
memoryStoreEvictionPolicy="LFU" />
</ehcache>
2.编写AOP的方法拦截器,此处采用环绕通知的方式实现方法拦截。
- package com.easyway.ecache.service;
- import java.io.Serializable;
- import net.sf.ehcache.Cache;
- import net.sf.ehcache.Element;
- import org.aopalliance.intercept.MethodInterceptor;
- import org.aopalliance.intercept.MethodInvocation;
- import org.apache.commons.logging.Log;
- import org.apache.commons.logging.LogFactory;
- import org.springframework.beans.factory.InitializingBean;
- /**
- * AOP方法拦截实现缓存的更新的
- *
- * MethodInterceptor:在方法调用会自动调用
- * InitializingBean:系统初始化时会自动初始化此类的特定的方法afterPropertiesSet()
- * @author longgangbai
- *
- */
- public class MethodCacheInterceptor implements MethodInterceptor, InitializingBean{
- private static final Log logger = LogFactory.getLog(MethodCacheInterceptor.class);
- private Cache cache;
- public void setCache(Cache cache) {
- this.cache = cache;
- }
- //invoke方法会在spring配置文件里的,指明的cache拦截的方法的调用时,自动触发它,如这个项目里,
- //当运行HelloEhcacheSpring.java类时,在showPersonsInfo方法里调用到personManager.getList()方法时,
- //它就会先调到这里来执行,执行完才行下执行它的业务
- public Object invoke(MethodInvocation invocation) throws Throwable {
- //这个表示哪个类调用(或触发)了这个MethodCacheInterceptor,
- String targetName = invocation.getThis().getClass().getName();
- //这个表示哪个方法触发了这个类(MethodCacheInterceptor)方法(invoke)的调用,
- String methodName = invocation.getMethod().getName();
- //调用的参数,这里没有参数
- Object[] arguments = invocation.getArguments();
- Object result;
- //这里得出的是:manager.PersonManagerImpl.getList
- String cacheKey = getCacheKey(targetName, methodName, arguments);
- Element element = cache.get(cacheKey);
- if (element == null) {
- // call target/sub-interceptor
- //这个就是调用数据访问方法,
- result = invocation.proceed();
- //如这里调用了getList()方法,会先打印出"get Person from DB" ,
- //然后将结果集放入到result里面去,这里由于使用的是自己配置只能放入10个元素的ehcache,
- //所以这里的result是ArrayList<E> ,它里面存放的是elementData[10],并将getList得到的结果放入到elementData里面去了
- System.out.println("set into cache");
- // cache method result
- //下面方法执行后,将cacheKey与数据集连起来,cacheKey是用来标识这个element的标志,我们可以有多个element(各自是来自不同的数据访问方法而形成的),区分它们就是用cacheKey,
- //这里的新生成后的element,含有cacheKey,还在element创建时间,访问时间,还有命令次数等cache的属性,我觉得它就像是一个小cache一样,下次要不要更新它就要看它的这些属性来决定。
- element = new Element(cacheKey, (Serializable) result);
- //放入cache中
- cache.put(element);
- }else{
- logger.debug("come from cache ...!");
- }
- //完成cache操作
- System.out.println("out cache");
- return element.getValue();
- }
- /**
- * 缓存特定的类:
- * @param targetName
- * @param methodName
- * @param arguments
- * @return
- */
- private String getCacheKey(String targetName, String methodName,
- Object[] arguments) {
- StringBuffer sb = new StringBuffer();
- sb.append(targetName).append(".").append(methodName);
- if ((arguments != null) && (arguments.length != 0)) {
- for (int i = 0; i < arguments.length; i++) {
- sb.append(".").append(arguments[i]);
- }
- }
- return sb.toString();
- }
- /**
- * 初始化时调用
- */
- public void afterPropertiesSet() throws Exception {
- if(null == cache) {
- throw new IllegalArgumentException("Cache should not be null.");
- }
- }
- }
package com.easyway.ecache.service;
import java.io.Serializable;
import net.sf.ehcache.Cache;
import net.sf.ehcache.Element;
import org.aopalliance.intercept.MethodInterceptor;
import org.aopalliance.intercept.MethodInvocation;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.InitializingBean;
/**
* AOP方法拦截实现缓存的更新的
*
* MethodInterceptor:在方法调用会自动调用
* InitializingBean:系统初始化时会自动初始化此类的特定的方法afterPropertiesSet()
* @author longgangbai
*
*/
public class MethodCacheInterceptor implements MethodInterceptor, InitializingBean{
private static final Log logger = LogFactory.getLog(MethodCacheInterceptor.class);
private Cache cache;
public void setCache(Cache cache) {
this.cache = cache;
}
//invoke方法会在spring配置文件里的,指明的cache拦截的方法的调用时,自动触发它,如这个项目里,
//当运行HelloEhcacheSpring.java类时,在showPersonsInfo方法里调用到personManager.getList()方法时,
//它就会先调到这里来执行,执行完才行下执行它的业务
public Object invoke(MethodInvocation invocation) throws Throwable {
//这个表示哪个类调用(或触发)了这个MethodCacheInterceptor,
String targetName = invocation.getThis().getClass().getName();
//这个表示哪个方法触发了这个类(MethodCacheInterceptor)方法(invoke)的调用,
String methodName = invocation.getMethod().getName();
//调用的参数,这里没有参数
Object[] arguments = invocation.getArguments();
Object result;
//这里得出的是:manager.PersonManagerImpl.getList
String cacheKey = getCacheKey(targetName, methodName, arguments);
Element element = cache.get(cacheKey);
if (element == null) {
// call target/sub-interceptor
//这个就是调用数据访问方法,
result = invocation.proceed();
//如这里调用了getList()方法,会先打印出"get Person from DB" ,
//然后将结果集放入到result里面去,这里由于使用的是自己配置只能放入10个元素的ehcache,
//所以这里的result是ArrayList<E> ,它里面存放的是elementData[10],并将getList得到的结果放入到elementData里面去了
System.out.println("set into cache");
// cache method result
//下面方法执行后,将cacheKey与数据集连起来,cacheKey是用来标识这个element的标志,我们可以有多个element(各自是来自不同的数据访问方法而形成的),区分它们就是用cacheKey,
//这里的新生成后的element,含有cacheKey,还在element创建时间,访问时间,还有命令次数等cache的属性,我觉得它就像是一个小cache一样,下次要不要更新它就要看它的这些属性来决定。
element = new Element(cacheKey, (Serializable) result);
//放入cache中
cache.put(element);
}else{
logger.debug("come from cache ...!");
}
//完成cache操作
System.out.println("out cache");
return element.getValue();
}
/**
* 缓存特定的类:
* @param targetName
* @param methodName
* @param arguments
* @return
*/
private String getCacheKey(String targetName, String methodName,
Object[] arguments) {
StringBuffer sb = new StringBuffer();
sb.append(targetName).append(".").append(methodName);
if ((arguments != null) && (arguments.length != 0)) {
for (int i = 0; i < arguments.length; i++) {
sb.append(".").append(arguments[i]);
}
}
return sb.toString();
}
/**
* 初始化时调用
*/
public void afterPropertiesSet() throws Exception {
if(null == cache) {
throw new IllegalArgumentException("Cache should not be null.");
}
}
}
3.Spring的关于缓存的配置类似事物的配置:
- <?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:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
- xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
- http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
- http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
- default-lazy-init="true">
- <!--配置缓存管理器 -->
- <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
- <property name="configLocation">
- <value>ehcache.xml</value>
- </property>
- </bean>
- <!-- 创建缓存的工厂的应用 -->
- <bean id="methodCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
- <property name="cacheManager">
- <ref local="cacheManager"/>
- </property>
- <property name="cacheName">
- <value>com.easyway.MethodCache</value>
- </property>
- </bean>
- <!-- 自定义缓存拦截器 -->
- <bean id="methodCacheInterceptor" class="com.easyway.ecache.service.MethodCacheInterceptor">
- <property name="cache">
- <ref local="methodCache"/>
- </property>
- </bean>
- <!-- 自定义拦截器 -->
- <bean id="methodCachePointCut" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
- <property name="advice">
- <ref local="methodCacheInterceptor"/>
- </property>
- <!-- 下面的配置就使得在数据访问时,cache将拦截从数据库获取的数据,与cache数据比较,如有就不放入cache,没有就放入,更新到数据库去,也是先存入cache,再更新到数据库中去 -->
- <property name="patterns">
- <list>
- <value>.*getServiceName</value>
- <value>.*testMethod</value>
- </list>
- </property>
- </bean>
- <!-- 声明一个服务 -->
- <bean id = "ticketServiceTarget" class="com.easyway.ecache.service.TicketService" />
- <!-- 相关的服务 -->
- <bean id="ticketService"
- class="org.springframework.aop.framework.ProxyFactoryBean">
- <property name="target">
- <ref local="ticketServiceTarget"/>
- </property>
- <property name="interceptorNames">
- <list>
- <value>methodCachePointCut</value>
- </list>
- </property>
- </bean>
- </beans>
<?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:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd"
default-lazy-init="true">
<!--配置缓存管理器 -->
<bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean">
<property name="configLocation">
<value>ehcache.xml</value>
</property>
</bean>
<!-- 创建缓存的工厂的应用 -->
<bean id="methodCache" class="org.springframework.cache.ehcache.EhCacheFactoryBean">
<property name="cacheManager">
<ref local="cacheManager"/>
</property>
<property name="cacheName">
<value>com.easyway.MethodCache</value>
</property>
</bean>
<!-- 自定义缓存拦截器 -->
<bean id="methodCacheInterceptor" class="com.easyway.ecache.service.MethodCacheInterceptor">
<property name="cache">
<ref local="methodCache"/>
</property>
</bean>
<!-- 自定义拦截器 -->
<bean id="methodCachePointCut" class="org.springframework.aop.support.RegexpMethodPointcutAdvisor">
<property name="advice">
<ref local="methodCacheInterceptor"/>
</property>
<!-- 下面的配置就使得在数据访问时,cache将拦截从数据库获取的数据,与cache数据比较,如有就不放入cache,没有就放入,更新到数据库去,也是先存入cache,再更新到数据库中去 -->
<property name="patterns">
<list>
<value>.*getServiceName</value>
<value>.*testMethod</value>
</list>
</property>
</bean>
<!-- 声明一个服务 -->
<bean id = "ticketServiceTarget" class="com.easyway.ecache.service.TicketService" />
<!-- 相关的服务 -->
<bean id="ticketService"
class="org.springframework.aop.framework.ProxyFactoryBean">
<property name="target">
<ref local="ticketServiceTarget"/>
</property>
<property name="interceptorNames">
<list>
<value>methodCachePointCut</value>
</list>
</property>
</bean>
</beans>
4.测试服务类:
- package com.easyway.ecache.service;
- import java.util.List;
- /**
- * 对其所有的以testMethod* ,getServiceName方式命令的方法,
- * 进行缓存处理。当调用其他命令时,不进行缓存
- * @author longgangbai
- *
- */
- @SuppressWarnings("unchecked")
- public class TicketService {
- public String testMethod(){
- System.out.println("没走缓存,直接调用TestService.testMethod()");
- return "china";
- }
- public void updateMethod(){
- System.out.println("updateMethod");
- }
- public void insertMethod(){
- System.out.println("insertMethod");
- }
- public void deleteMethod(){
- System.out.println("deleteMethod");
- }
- /**
- * 需要缓存的集合
- */
- private List ticketList;
- /**
- * 需要缓存的服务名称
- */
- private String serviceName;
- public String getServiceName() {
- return serviceName;
- }
- public void setServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
- public List getTicketList() {
- return ticketList;
- }
- public void setTicketList(List ticketList) {
- this.ticketList = ticketList;
- }
- /**
- * 修改的服务端名称备注但是不缓存
- * @param serviceName
- */
- public void changesetServiceName(String serviceName) {
- this.serviceName = serviceName;
- }
- }
package com.easyway.ecache.service;
import java.util.List;
/**
* 对其所有的以testMethod* ,getServiceName方式命令的方法,
* 进行缓存处理。当调用其他命令时,不进行缓存
* @author longgangbai
*
*/
@SuppressWarnings("unchecked")
public class TicketService {
public String testMethod(){
System.out.println("没走缓存,直接调用TestService.testMethod()");
return "china";
}
public void updateMethod(){
System.out.println("updateMethod");
}
public void insertMethod(){
System.out.println("insertMethod");
}
public void deleteMethod(){
System.out.println("deleteMethod");
}
/**
* 需要缓存的集合
*/
private List ticketList;
/**
* 需要缓存的服务名称
*/
private String serviceName;
public String getServiceName() {
return serviceName;
}
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
public List getTicketList() {
return ticketList;
}
public void setTicketList(List ticketList) {
this.ticketList = ticketList;
}
/**
* 修改的服务端名称备注但是不缓存
* @param serviceName
*/
public void changesetServiceName(String serviceName) {
this.serviceName = serviceName;
}
}
5.测试用例
- package com.easyway.ecache.service;
- import org.springframework.context.ApplicationContext;
- import org.springframework.context.support.ClassPathXmlApplicationContext;
- /**
- * 这里使用了ehcache与spring结合,这里并没用用到数据库,用spring只是用来管理bean,
- * 这里用ehcache就相当于数据库,存放对象信息
- * @author longgangbai
- */
- @SuppressWarnings({"unchecked"})
- public class HelloEhcacheSpring{
- public static void main(String[] args) {
- ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:applicationContext.xml");
- TicketService ticketSrv = (TicketService) context.getBean("ticketService");
- //配置了spring就可以从配置文件里找到对应的接口实现类,再生成实例对象,以完成业务处理
- String srvName0=ticketSrv.testMethod();
- //获取初始化服务端名称
- System.out.println("srvName0="+srvName0);
- //设置存储的名称
- ticketSrv.setServiceName("ticketService");
- String srvName1=ticketSrv.testMethod();
- //获取服务端名称
- System.out.println("srvName1="+srvName1);
- //修改服务名称但是不缓存
- ticketSrv.updateMethod();
- String srvName2=ticketSrv.testMethod();
- //获取服务端名称来源自缓存注意观察
- System.out.println("srvName2="+srvName2);
- }
- }
package com.easyway.ecache.service;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
/**
* 这里使用了ehcache与spring结合,这里并没用用到数据库,用spring只是用来管理bean,
* 这里用ehcache就相当于数据库,存放对象信息
* @author longgangbai
*/
@SuppressWarnings({"unchecked"})
public class HelloEhcacheSpring{
public static void main(String[] args) {
ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:applicationContext.xml");
TicketService ticketSrv = (TicketService) context.getBean("ticketService");
//配置了spring就可以从配置文件里找到对应的接口实现类,再生成实例对象,以完成业务处理
String srvName0=ticketSrv.testMethod();
//获取初始化服务端名称
System.out.println("srvName0="+srvName0);
//设置存储的名称
ticketSrv.setServiceName("ticketService");
String srvName1=ticketSrv.testMethod();
//获取服务端名称
System.out.println("srvName1="+srvName1);
//修改服务名称但是不缓存
ticketSrv.updateMethod();
String srvName2=ticketSrv.testMethod();
//获取服务端名称来源自缓存注意观察
System.out.println("srvName2="+srvName2);
}
}
6.测试结果:
没走缓存,直接调用TestService.testMethod()
打印信息如下:
set into cache
out cache
srvName0=china
out cache
srvName1=china
updateMethod
out cache
srvName2=china
发表评论
-
Spring中AOP实现EHCache的整合中采用SpringModule结合(二)
2011-09-07 18:09 1569在Spring中通过EHCache实现缓存,必须手动缓存或者 ... -
OsCache MemCache EhCache
2011-08-17 15:02 2346Memcache:分布式内存对象缓存系统,占用其他机子的内存。 ... -
分布式缓存集群环境配置
2011-07-12 17:49 1526ehcache提供三种网络连接策略来实现集群,rmi,jg ... -
大型高并发高负载web应用系统架构-缓存架构策略
2011-06-21 22:52 1896目前在网站的架构构 ... -
EHCACHE简介
2010-06-25 15:31 1525二级缓存 EHCache是一个快速的、轻量级的、易于使用的、 ... -
应用OSCache提升J2EE系统运行性能
2010-06-24 16:50 1267Cache是一种用于提高系 ... -
服务器缓存
2010-06-20 23:46 1796Web缓存最权威的资料就属RFC了,可惜它太过言简意赅,本文将 ...
相关推荐
NULL 博文链接:https://topmanopensource.iteye.com/blog/752948
1.标题所提及技术的整合,Spring包括mvc、aop、ioc等。个人属于强迫症类型,技术水平怎么样再说,代码必须好看 2.Hibernate几个级别缓存对比。见DaoImpl类 3.Ehcache方法缓存及页面缓存。见applicationContext-cache...
struts2.3.8spring3.2.1hibernate4.2.0最新整合 ehcache-2.7.0.jar xwork-core-2.3.8.jar spring-aop-3.2.1.RELEASE.jar hibernate-jpa-2.0-api-1.0.1.Final.jar
本实例的环境 eclipse + maven + spring + ehcache + junit EhCache 是一个纯Java的进程内缓存框架,具有快速、精干等特点,是Hibernate中默认的...使用Spring的AOP进行整合,可以灵活的对方法的返回结果对象进行缓存
Spring Boot中使用Ehcache缓存数据 Spring Boot中的JSON技术 Spring Boot中编写单元测试 Spring Boot整合Swagger2构建RESTful API 使用Actuator监控Spring Boot应用 使用Spring Boot发送邮件 使用Spring Boot Admin...
Spring面向切面编程,提供AOP实现。Spring Beans之上将横切关注点模块化 2. spring-aspects-4.1.1.RELEASE.jar 提供的对AspectJ框架的整合,也是A面向切面编程。 AspectJ可用于基于普通Java对象的模块化 注意:...
1.标题所提及技术的整合,Spring包括mvc、aop、ioc等。个人属于强迫症类型,技术水平怎么样再说,代码必须好看 2.Hibernate几个级别缓存对比。见DaoImpl类 3.Ehcache方法缓存及页面缓存。见applicationContext-cache...
- Spring Boot 缓存,包括redis、ehcache、spring-cache、memcached、使用redis实现session共享 等。 - springboot-templates - Spring Boot 模板,包括thymeleaf、freemarker、jsp、表单校验 等。 - ...
JAVA编程之spring cache本机缓存应用 spring cache简单实用,简介: ...它不是具体的缓存实现,它只提供一整套的接口和代码规范、配置、注解等,用于整合各种缓存方案,比如Caffeine、Guava Cache、Ehcache。
【ehcache整合】 mybatis-ehcache-1.0.3.jar ehcache-core-2.6.8.jar log4j-1.2.17.jar slf4j-api-1.7.21.jar slf4j-log4j12-1.7.21.jar 4)其他 【数据源 驱动】 c3p0-0.9.5.4.jar mysql-connector-...
【ehcache整合】 ehcache-core-2.6.8.jar mybatis-ehcache-1.0.3.jar slf4j-api-1.7.21.jar slf4j-log4j12-1.7.21.jar log4j-1.2.16.jar 【数据源 连接池】 mysql-connector-java-5.1.48.jar c3p0-0.9.1.2...
Mybatis(数据库CRUD),Mybatis(Mybatis数据库CRUD),thymeleaf(模板解析),beetl(模板解析),freemarker (模板解析),enjoy(模板解析),并包含一些整合多个功能模块的090-blog(SSH实现一个简单的博客)...
- chapter1:[基本项目构建(可作为工程脚手架),引入web模块,完成一个简单的RESTful API](http://blog.didispace.com/spring-boot-learning-1/) - [使用Intellij中的Spring Initializr来快速构建Spring Boot/...
主要介绍了Ehcache简介,使用Spring的AOP进行整合,可以灵活的对方法的返回结果对象进行缓存
20020414.jar,slf4j-api-1.5.8.jar,slf4j-log4j12-1.5.8.jar,spring-aop-3.0.7.RELEASE.jar,spring-asm-3.0.7.RELEASE.jar,spring-beans-3.0.7.RELEASE.jar,spring-context-3.0.7.RELEASE.jar,spring-core-3.0.7....
使用Intellij中的Spring Initializr来快速构建Spring Boot/Cloud工程 工程配置 chapter2-1-1:配置文件详解:自定义属性、随机数、多环境配置等 chapter2-1-2:2.0 新特性(一):配置绑定全解析 chapter2-2-1:2.0 ...
spring-aop-3.2.0.RELEASE.jar spring-aspects-3.2.0.RELEASE.jar spring-beans-3.2.0.RELEASE.jar spring-context-3.2.0.RELEASE.jar spring-context-support-3.2.0.RELEASE.jar spring-core-3.2.0.RELEASE.jar ...
另外的问题就是spring和hibernate整合的问题了,当时也是一股脑的将hibernate和spring的包全导入进来,然后发布,启动tomcat,查看报错的问题,这个方面到没有出现版本差异的问题,典型的就是缺包,然后报找不到类,...
阿里云java短信验证码源码 ...SpringBoot整合AOP面向切面编程的过程实现 SpringBoot-Ehcache ----- SpringBoot整合Ehcache高速缓存 SpringBoot-Chart ----- Spring Boot整合JFreeChart各种图表绘制类