---
title: "tomcat启动很慢解决办法"
author: "wangning1125"
date: "2018-08-30T23:06:54Z"
tags: []
categories: ["开源软件"]
slug: "tomcat"
draft: false
lastmod: "2018-08-30T23:06:54Z"
id: 2429786
url: "https://wangning1125.iteye.com/blog/2429786"
---

很多人肯定都用tomcat容器来启动项目，但可能有些时候启动时间特别长，甚至达到了几万毫秒至几十万毫秒，除去开发idea的问题和代码架构本身问题外，可能就是tomcat容器的优化问题，下面提供一种优化启动的方式。

1.首先我们找到安装的jdk环境目录，打开$JAVA_PATH/jre/lib/security/java.security这个文件，我这里以jdk1.8为例


然后打开java.security文件找到如下


然后把securerandom.source=file:/dev/urandom
替换成

securerandom.source=file:/dev/./urandom




