12:18:55541 INFO [UpdateChecker]新发现的更新(S):2.0.0 [http://ehcache.org/news.html]如何禁用Ehcache更新检查器?
我如何抑制了Ehcache检查新的更新(S),这是在加载我的J2EE应用程序中发生的事情,当ehcache正在初始化。
12:18:55541 INFO [UpdateChecker]新发现的更新(S):2.0.0 [http://ehcache.org/news.html]如何禁用Ehcache更新检查器?
我如何抑制了Ehcache检查新的更新(S),这是在加载我的J2EE应用程序中发生的事情,当ehcache正在初始化。
一种方法是在类路径中放置一个ehcache.xml
。
使用根标签中的属性updateCheck=”false”
,困扰已消失。
在这里你可以找到更多关于它的信息:http://www.svenlange.co.za/2010/02/disable-ehcaches-updatechecker-in-grails-application
另一种方法是做到以下几点:
System.setProperty("net.sf.ehcache.skipUpdateCheck", "true");
正是我所期待的 - 谢谢。修改ehcache.xml有帮助,并且它已经存在于类路径 – Joe 2010-03-12 03:56:52
实际上,这是部分正确的,sys prop设置将起作用,但仅仅将ehcache xml文件放在类路径的根目录下不会。您还必须将updateCheck =“false”添加到外部ehcache元素,如下所述@Anthony Dahanne和文档中:http://ehcache.org/documentation/user-guide/configuration – TechTrip 2013-02-25 15:24:15
当前配置文档位于http:// www.ehcache.org/documentation/2.8/configuration/configuration.html#update-checker – Gregor 2017-05-26 14:43:18
还有另外一种方式:在配置文件ehcache.xml中中关闭更新选项UpdateCheck的= “假”,如下示例:
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="ehcache.xsd"
updateCheck="false" monitoring="autodetect"
dynamicConfig="true">
简单地说,在ehcache.xml中的配置文件,确保您禁用UpdateCheck的:
<ehcache updateCheck="false">
<defaultCache
maxElementsInMemory="0"
eternal="false"
timeToIdleSeconds="0"
timeToLiveSeconds="0"
overflowToDisk="false"
diskPersistent="false"
/>
</ehcache>
该文件必须位于类路径的根目录中。 – Tires 2013-08-20 18:26:45
此功能是完全失败。我不明白他们为什么这样做。想象一下,如果一个应用程序的所有20个依赖项都这样做了会发生什么! – cherouvim 2010-08-14 07:11:49
@cherouvim:完全同意。谷歌搜索显示一个[Jira问题](https://jira.terracotta.org/jira/browse/EHC-461),5年前关闭为“不会修复”。让开源软件表现出令人难以置信的干扰方式。 – 2014-11-13 00:47:27