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

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

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



staceoverflow链接如下:

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

你可能感兴趣的:(spring-boot启动不了,报错 java.lang.NoClassDefFoundError: javax/servlet/ServletContext)