雲服務器,啓動tomcat超級慢,經常卡在類似:
Root WebApplicationContext: initialization completed in xxxx ms
或
Deploying web application directory.
後面要等好久,纔會執行。
直接呈上解決辦法:
$ echo $JAVA_HOME
$ cd $JAVA_HOME/jre/lib/security/
$ vi ./java.security
找到securerandom.source這項,修改random爲urandom:
securerandom.source=file:/dev/urandom