您的位置:首页 > 其它

学习记录 - ehcache升级检查所带来的connet timed out 解决方法

2017-04-25 15:51 369 查看
在学习mybatis和ehcache整合过程中,调试的时候发现日志显示timed out错误,百度搜索发现:

报错原因:

跟ehcache整合使用的时候,ehcache默认启用自动更新检查,检查版本更新,但由于各种网络问题更新不成功,http请求超时,所以就出现了Timeout的异常。

解决方案:

修改classpath下的 ehcache.xml文件,加入下面蓝色一行

<ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

xsi:noNamespaceSchemaLocation="../config/ehcache.xsd"
updateCheck="false">
<diskStore path="F:\develop\ehcache" />
<defaultCache 
maxElementsInMemory="1000" 
maxElementsOnDisk="10000000"
eternal="false" 
overflowToDisk="false" 
timeToIdleSeconds="120"
timeToLiveSeconds="120" 
diskExpiryThreadIntervalSeconds="120"
memoryStoreEvictionPolicy="LRU">
</defaultCache>

</ehcache>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: