WARN [net.sf.ehcache.config.Configurator] – No configuration found.
WARN [net.sf.ehcache.config.Configurator] – No configuration found.
Configuring ehcache from ehcache-failsafe.xml found in the classpath:
jar:file:/D:/apache-tomcat-6.0.18/webapps/forum/WEB-INF/lib/ehcache-1.1.jar!/ehcache-failsafe.xml
这个问题的原因是hibernate的二级缓存没有配置
这个解决办法是在从ehcache-1.1.jar 中把文件ehcache-failsafe.xml 解压出来改名 ehcache.xml 复制到classes下面
配置文件解读:
表示设定缓存的默认数据过期策略。
name表示具体的缓存命名。
maxElementsInMemory表示cache中最大允许保存的对象数据量。
eternal表示cache中数据是否为常量。
timeToIdleSeconds表示缓存数据钝化时间
timeToLiveSeconds表示缓存数据的生命时间。
overflowToDisk表示内存不足时,是否启用磁盘缓存。



















