1、首先部署springboot项目的tomcat的版本必须在8.0之后

2、springboot 同样是基于maven的,那么在pom.xml中的tomcat的依赖:

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
<exclusions>
<exclusion>
<artifactId>tomcat-embed-el</artifactId>
<groupId>org.apache.tomcat.embed</groupId>
</exclusion>
<exclusion>
<artifactId>tomcat-embed-websocket</artifactId>
<groupId>org.apache.tomcat.embed</groupId>
</exclusion>
</exclusions>
</dependency>

3、这个地方就是坑了,不仅仅tomcat的版本要在8.0之上,就连javaee的版本也要在8.0及以上

<dependency>
<groupId>javax</groupId>
<artifactId>javaee-api</artifactId>
<version>8.0</version>
</dependency>

 

其他基础必备的,加上这些坑就应该ok的了

 

相关文章:

  • 2021-04-24
  • 2022-12-23
  • 2022-12-23
  • 2021-04-23
  • 2021-04-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-04-27
  • 2021-06-09
  • 2022-12-23
  • 2021-07-03
  • 2021-07-14
  • 2021-09-11
相关资源
相似解决方案