[心缘地方]同学录
首页 | 功能说明 | 站长通知 | 最近更新 | 编码查看转换 | 代码下载 | 常见问题及讨论 | 《深入解析ASP核心技术》 | 王小鸭自动发工资条VBA版
登录系统:用户名: 密码: 如果要讨论问题,请先注册。

[备忘]net.sf.ehcache.util.UpdateChecker - Update check failed: java.net.SocketTimeoutException: connec

上一篇:[备忘]mybatis的错误:invalid comparison: java.util.Date and java.lang.String
下一篇:[整理]Mybatis拦截器,记录所有sql异常

添加日期:2016/6/2 17:39:58 快速返回   返回列表 阅读5329次
ehcache,每次启动,去检查是否有新版本,晕死

关键连不上url,导致启动憋了半天。

关闭方法:
(1)在ehcache配置文件第一行中增加updateCheck属性,停止检查更新
<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" ... updateCheck="false">

(2)设置system属性"net.sf.ehcache.skipUpdateCheck"为true即可。
System.setProperty("net.sf.ehcache.skipUpdateCheck", "true");
------------------------------------
UpdateChecker类的部分代码如下:


/**
     * This method ensures that there will be no exception thrown.
     */
    public void checkForUpdate() {
        try {
            if (!Boolean.getBoolean("net.sf.ehcache.skipUpdateCheck")) {
                doCheck();
            }
        } catch (Throwable t) {
            LOG.debug("Update check failed: ", t);
        }
    }
 
    private void doCheck() throws IOException {
        URL updateUrl = buildUpdateCheckUrl();
        if (Boolean.getBoolean("net.sf.ehcache.debug.updatecheck")) {
            LOG.info("Update check url: {}", updateUrl);
        }
        Properties updateProps = getUpdateProperties(updateUrl);



 

评论 COMMENTS
guest535107847
2017/2/22 15:21:15
感谢

添加评论 Add new comment.
昵称 Name:
评论内容 Comment:
验证码(不区分大小写)
Validation Code:
(not case sensitive)
看不清?点这里换一张!(Change it here!)
 
评论由管理员查看后才能显示。the comment will be showed after it is checked by admin.
CopyRight © 心缘地方 2005-2999. All Rights Reserved