java – 防止ehcache尝试在启动时访问Internet

我有一个相当简单的非集群应用程序运行带有 spring和hibernate的ehcache.

在启动时我收到此错误

<06-Sep-2010 19:14:05 o'clock BST> <Error> <Net>  <Failed to communicate with proxy:   10.x.x.x/8080. Will try connection www.terracotta.org/80 Now.

java.net.socketTimeoutException:连接超时

如何阻止此通话?

这是我的ehcache.xml:

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
     xsi:noNamespaceSchemaLocation="ehcache.xsd"
         updateCheck="false" monitoring="off" dynamicConfig="false">


<defaultCache maxElementsInMemory="1000" eternal="false"
    timetoIdleSeconds="60" timetoLiveSeconds="60"
     overflowTodisk="false" >
      <terracotta clustered="false"/>
</defaultCache>

我确信这个ehcache.xml正在被选中并被使用,例如没有类路径问题.

我正在使用:ehcache 2.0.1和hibernate 3.3.1.GA

解决方法

将updateCheck =“false”添加到< ehcache />如果元素不起作用,请尝试在命令行中使用-Dnet.sf.ehcache.skipUpdateCheck = true或以编程方式使用System.setProperty(“net.sf.ehcache.skipUpdateCheck”,“true”)设置系统属性.

相关文章

应用场景 C端用户提交工单、工单创建完成之后、会发布一条工...
线程类,设置有一个公共资源 package cn.org.chris.concurre...
Java中的数字(带有0前缀和字符串)
在Java 9中使用JLink的目的是什么?
Java Stream API Filter(过滤器)
在Java中找到正数和负数数组元素的数量