Servlet should have a mapping

第一种可能:

你就是没写Servlet

  
        SpringMVC
        org.springframework.web.servlet.DispatcherServlet
        
        
            contextConfigLocation
            classpath:SpringMvc-config.xml
        
        1
        true
    
    
        SpringMVC
        /
    

第二种可能:

你这个是粘贴过来的文件,不是系统自动生成的,需要配置在ProjectStruction中配置i

Servlet should have a mapping_第1张图片

Servlet should have a mapping_第2张图片

添加完成之后apply ->OK 然后 可能还是爆红是因为没有刷新,手动用maven的刷新刷新一次就没有了

你可能感兴趣的:(maven,servlet,maven)