上一页 1 ··· 25 26 27 28 29

2012年10月21日

摘要: 步骤 1 新建java工程 2 Spring相关的jar包放到lib目录下 3 写一个测试bean 4 写配置文件 5 写main函数 2018-09-14 Spring自动搜bean的配置 还有一个很奇怪的现象:我的类在cn.angelshelter.spring_study.Student 如果 阅读全文
posted @ 2012-10-21 21:42 angelshelter 阅读(201) 评论(0) 推荐(0) 编辑
摘要: 先来说说常用属性吧maxElementsInMemory="10000" //内存中最多有10000个缓存块,或者说是缓存的数据对象eternal="false" //不是一直存在的,即有一定生存期,过了生存期就会被清除掉 timeToIdleSeconds="120" //闲置时间,我的理解是过了120s没有访问的话就清除 timeToLiveSeconds="120" //存活时间,overflowToDisk="true" //如果内存满了就放到硬盘里maxElementsOnDisk=& 阅读全文
posted @ 2012-10-21 20:57 angelshelter 阅读(146) 评论(0) 推荐(0) 编辑

2012年10月20日

摘要: Spring缓存机制中,包括两个方面的缓存操作1.缓存某个方法返回的结果或者流2.在某个方法执行前或后清空缓存Spring的缓存机制是基于Spring的AOP,那么在 Spring Cache中应该存在着一个Advice。那就是org.springframework.cache.Cache。但spring并不是直接使用org.springframework.cache.Cache,spring把Cache对象交给org.springframework.cache.CacheManager来管理。在spring对EHCache的支持中,org.springframework.cache.ehca 阅读全文
posted @ 2012-10-20 22:52 angelshelter 阅读(480) 评论(0) 推荐(0) 编辑
上一页 1 ··· 25 26 27 28 29

导航