Spring boot 启动时间非常长的问题

    一次项目实施过程中,发现线上的Spring boot在启动时,耗时非常长。在日志中发现这样的情况:
o.a.c.util.SessionIdGeneratorBase        : Creation of SecureRandom instance for session ID generation using [SHA1PRNG] took [170,241] milliseconds.

    查找相关资料,发现是随机数生成器的问题。需要在启动命令里加上
 
 -Djava.security.egd=file:/dev/./urandom

   

猜你喜欢

转载自godjohnny.iteye.com/blog/2325701