No configuration found

报错:No configuration found. Configuring ehcache from ehcache-failsafe.xml found in the classpath:.....

原因:报这个错是因为在/sandh/web-inf/classes下面没有ehcache.xml这个文件!这个文件是hibernate缓存配置文件。

解决方法:从ehcache-1.1.jar  中把文件ehcache-failsafe.xml  解压出来改名 ehcache.xml 复制到classes下面就行了!

配置文件解读:
<defaultCache>表示设定缓存的默认数据过期策略。
name表示具体的缓存命名。
maxElementsInMemory表示cache中最大允许保存的对象数据量。
eternal表示cache中数据是否为常量。
timeToIdleSeconds表示缓存数据钝化时间
timeToLiveSeconds表示缓存数据的生命时间。
overflowToDisk表示内存不足时,是否启用磁盘缓存。

weiking   2008-05-23 12:52:55 评论:0   阅读:310   引用:0

发表评论>>

署名发表(评论可管理,不必输入下面的姓名)

姓名:

主题:

内容: 最少15个,最长1000个字符

验证码: (如不清楚,请刷新)

用,就用的漂亮点。文章嘛,借花献佛喽。