折腾了半天,后来查资料解决了记录下
1.jdk和tomcat版本不兼容 (tomcat版本必须>=jdk版本)
2.包可能冲突,原本我的tomcat是这样的后来加了个provided解决了
更改前:
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
</dependency>
更改后:
<dependency>
<groupId>org.apache.tomcat.embed</groupId>
<artifactId>tomcat-embed-jasper</artifactId>
<scope>provided</scope>
</dependency>