启动tomcat很慢,检查后发现:[localhost-startStop-1] org.apache.catalina.util.SessionIdGeneratorBase.createSecureRandom Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [131,830] milliseconds。主要时间都花在Creation of SecureRandom instance上了。
百度谷歌了一番。。解决办法:打开$JAVA_HOME/jre/lib/security/java.security这个文件,找到下面的内容: securerandom.source=file:/dev/urandom
替换成
securerandom.source=file:/dev/./urandom
原文地址:https://www.cnblogs.com/hurner/p/6401471.html