最近接触的项目在tomcat启动时特别慢,启动将近花十分钟,在开发的过程中,出现一个java文件修正,tomcat就重新启动一次,实在无法忍受,上网查了一下tomcat的热部署和热加载,才知道是由于【reloadable="true"】导致的。
下面是关于reloadable的解释,如果【/WEB-INF/classes/】或者/WEB-INF/lib 下面有变化,tomcat会重新加载整个web应用。
reloadable:Set to true
if you want Catalina to monitor classes in /WEB-INF/classes/
and /WEB-INF/lib
for changes, and automatically reload the web application if a change is detected. This feature is very useful during application development, but it requires significant runtime overhead and is not recommended for use on deployed production applications. That's why the default setting for this attribute is false. You can use the