spring中配置二级缓存
spring中配置二级缓存
关键字: spring hibernate ehcache
??? ?maxElementsInMemory="1000"??????? eternal="false"
??????? timeToIdleSeconds="100"
??????? timeToLiveSeconds="4200"
??????? overflowToDisk="true"
??? ?/>??
4.最后一步,在TArticleclass.hbm.xml里加上
<cache usage="read-write"/>
启动Tomcat,如发现如下错误
Could not find configuration [org.hibernate.cache.UpdateTimestampsCache]; using defaults.
Could not find configuration [org.hibernate.cache.StandardQueryCache]; using defaults.
则是第二步没有做,加上即可.配置完毕
?
出处:http://www.blogjava.net/WshmAndLily/articles/137244.html