在tomcat部署了web项目,每次启动项目都需要花费2-3分钟,甚至有的时候需要花费10分钟左右,实在是太慢了。
在网上查找解决方案,把 jdk/jre/lib/security/java.security 文件中 securerandom.source=file:/dev/random 改为 securerandom.source=file:/dev/./urandom即可
究其原因是在于 /dev/random 的随机处理形式比较费时,虽然随机性较高,但是会随着读取的内容越多而越慢,所以需要将JDK下的这个更改为随机性较低,但是响应速度更快的处理配置
p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; color: #000000; background-color: #ffffff }
span.s1 { }
span.s2 { background-color: #e6e600 }
原文地址:https://www.cnblogs.com/lay2017/p/8455260.html
时间: 2024-12-13 05:37:12