方法一、更改index.html的配置,版本改为3.0,添加absolute-ordering标签
<web-app xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd"
version="3.0"
metadata-complete="true">
<!-- 3.0以后才有absolute-ordering,用来扫描架包,写为空,表示不扫描任何架包,提升启动速度 -->
<absolute-ordering></absolute-ordering>
方法二、tomcat的路径,找到webapps,只保留“ROOT文件夹”和 “自己的工程的文件夹”,其他的全部删除