springMVC--关于no mapping found for http request with uri .......
2017-09-18 20:30
393 查看
首次部署springMVC项目时,很有可能会遇到这个可恶的警告: no mapping found for http request with uri **** in dispatcherservlet with name **,解决这个问题真的是用了很长的时间,总结一下解决的方法
1>首先一定要看下你的请求路径写错了没,不然可能会因为这个简单的疏忽而浪费很长的时间
2>其次再看一下springMVC的配置文件,其中配置的 <context:component-scan base-package="***"/>到对有没有扫描到你定义的handler所在的包
3>如果上面的的都没有解决,就要看下web.xml文件了
<servlet-mapping>
<servlet-name>springMVC</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
这里的请求拦截路径是 / 而不是 /*
4>最后要看下配置文件的路径,这里要具体的到tomcat下去找配置文件的路径,才不会出错
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:com/lee/config/springmvc.xml</param-value>
</init-param>
classpath:是指到WEB-INF下的classes,其余的路径要根据tomcat下的具体路径去写
1>首先一定要看下你的请求路径写错了没,不然可能会因为这个简单的疏忽而浪费很长的时间
2>其次再看一下springMVC的配置文件,其中配置的 <context:component-scan base-package="***"/>到对有没有扫描到你定义的handler所在的包
3>如果上面的的都没有解决,就要看下web.xml文件了
<servlet-mapping>
<servlet-name>springMVC</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
这里的请求拦截路径是 / 而不是 /*
4>最后要看下配置文件的路径,这里要具体的到tomcat下去找配置文件的路径,才不会出错
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>classpath*:com/lee/config/springmvc.xml</param-value>
</init-param>
classpath:是指到WEB-INF下的classes,其余的路径要根据tomcat下的具体路径去写
相关文章推荐
- springMVC--关于no mapping found for http request with uri
- SpringMVC - 问题. No mapping found for HTTP request with URI
- No mapping found for HTTP request with URI [/chart/get] in DispatcherServlet with name 'SpringMVC‘
- 关于警告: No mapping found for HTTP request with URI [/spMVC/] in DispatcherServlet with name 'spMVC'的问题
- SpringMvc4.2.5 零配置出现 No mapping found for HTTP request with URI
- springMVC 报404 No mapping found for HTTP request with URI [/ssmAngular/student/toIndex] in Dispatch
- 关于No mapping found for HTTP request with URI和in DispatcherServlet with name 'qht_client'
- idea部署SpringMVC项目出现No mapping found for HTTP request with URI [xxxxxxx] in DispatcherServlet ...错误
- No mapping found for HTTP request with URI [/index.do] in DispatcherServlet with name 'SpringMVC‘
- No mapping found for HTTP request with URI [/SpringMvc2/ItemList] in DispatcherServlet with name 'sp
- springMVC报WARNING: No mapping found for HTTP request with URI [/springMVC/hello] in DispatcherServle
- SpringMVC:No mapping found for HTTP request with URI [/account/*] in DispatcherServlet with
- No mapping found for HTTP request with URI [/app17a/] in DispatcherServlet with name 'springmvc'解决方法
- springmvc发生No mapping found for HTTP request with URI[...] in dispatcher servlet
- springMVC之No mapping found for HTTP request with URI 问题
- No mapping found for HTTP request with URI [/index.html] in DispatcherServlet with name 'springmvc'
- 关于No mapping found for HTTP request with URI [访问路径] in DispatcherServlet with dispatche
- springmvc 出现No mapping found for HTTP request with URI
- 完美解决SpringMVC中静态资源无法找到(No mapping found for HTTP request with URI)问题
- SpringMVC资源无法找到(No mapping found for HTTP request with URI)问题解决