【异常】java.lang.ClassNotFoundException: javax.servlet.ServletContext

abnormal

java.lang.ClassNotFoundException: javax.servlet.ServletContext

 

 

solution

One,

Modify the configuration IDEA

 


 

two,

[Modify] pom.xml configuration file:

Step 1: Find the picture of "spring-boot-starter-tomcat" label, there are three ways you can try;

The <scope> provided </ scope> commented;
<scope> SUMMARY Provided tag into the compile: <scope> the compile </ scope>;
<scope> specify the specific version of the tag, such as: <version> xxxRELEASE </ version >;
step 2: this is the configuration on the container, the container tomcat need to reload it.

 

 

 

 

 

 

 

Published 53 original articles · won praise 0 · Views 809

Guess you like

Origin blog.csdn.net/G971005287W/article/details/105265473