加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 编程开发 > Java > 正文

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

发布时间:2020-12-15 02:49:00 所属栏目:Java 来源:网络整理
导读:我有一个相当简单的非集群应用程序运行带有 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
我有一个相当简单的非集群应用程序运行带有 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”)设置系统属性.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读