根据网上查找的资料,将pom.xml文件中的servlet-api.jar 在intellij中的依赖去掉就能够了,测试可用api
会看到这样的图示:测试
而后选中一个jar包,点击exclude便可:xml