IDEA SpringMVC web.xml报错 org.springframework.web.servlet.DispatcherServlet' is not assignable to javax.servlet.Servlet

如图:

解决办法:

选中add

然后就不会报错了 is not assignable to javax.servlet.Servlet