spring-boot启动不了,报错 java.lang.NoClassDefFoundError: javax/servlet/ServletContext

时间:2023-01-19 22:03:43

找了半天,pom配置文件中更改一下配置即可,

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
把scopt注释掉即可;之前尝试将provided改为runtime也没用.



staceoverflow链接如下:

http://*.com/questions/30374316/spring-boot-java-lang-noclassdeffounderror-javax-servlet-filter