32

12:18:55,541 信息 [UpdateChecker] 发现新更新:2.0.0 [ http://ehcache.org/news.html]

如何抑制 ehcache 检查新更新,这是在加载我的 j2ee 应用程序和初始化 ehcache 时发生的。

4

2 回答 2

38

一种方法是将ehcache.xml文件放在类路径中,并updateCheck="false"在根标记中添加属性。

例如:

<ehcache updateCheck="false">
  <defaultCache
    maxElementsInMemory="0"
    eternal="false"
    timeToIdleSeconds="0"
    timeToLiveSeconds="0"
    overflowToDisk="false"
    diskPersistent="false"/>
</ehcache>

另一种方法是设置环境变量:

System.setProperty("net.sf.ehcache.skipUpdateCheck", "true");
于 2010-03-11T12:49:05.217 回答
18

简单地说,在您的 ehcache.xml 配置文件中,确保禁用 updateCheck :

<ehcache updateCheck="false">

<defaultCache
        maxElementsInMemory="0"
        eternal="false"
        timeToIdleSeconds="0"
        timeToLiveSeconds="0"
        overflowToDisk="false"
        diskPersistent="false"
        />
</ehcache>
于 2012-12-05T21:05:01.503 回答