Springboot重启后第一次访问速度慢

每次重启Springboot写的管理平台之后,第一次访问登录页都慢的要死,需要等待差不多半分钟,才能进去。
百度之后知道了,是tomcat的session生成策略造成的。

最后我是通过下面的方法解决的,找到安装的jre目录,如jre/lib/security,然后修改java.security文件的securerandom.source字段的值为"file:/dev./urandom":

securerandom.source=file:/dev./urandom

最后,重启Springboot项目,感受秒进的快乐吧~

转载于:https://www.jianshu.com/p/5fe0e6fde941

猜你喜欢

转载自blog.csdn.net/weixin_34364071/article/details/91170425