No mapping found for HTTP request with URI [/springmvc-1/springmvc/testParamsAndHeaders] in Dispatch
程序员文章站
2022-07-15 13:40:05
...
我的错误可能不是常规错误,其他常规错误的解决可能是HTTP URL没有映射出来,也就是说的你controller没有注入。
我的是在写请求头参数的时候包的错误。
解决办法:
请求头参数等号两侧均不能有空格!!!
/**
* 了解: 可以使用 params 和 headers 来更加精确的映射请求. params 和 headers 支持简单的表达式.
*
* @return
*/
@RequestMapping(value = "/testParamsAndHeaders", params = { "username", "age!=10" }, headers = {
"Accept-Language=zh-Hans-CN,zh-Hans;q=0.5"})
public String testParamsAndHeaders() {
System.out.println("testParamsAndHeaders");
return SUCCESS;
}
错误:✖
正确:✔
推荐阅读
-
No mapping found for HTTP request with URI [/springmvc-1/springmvc/testParamsAndHeaders] in Dispatch
-
vue+No mapping found for HTTP request with URI [*//**] in DispatcherServlet with name ‘springMvc‘
-
异常记录二:寻求解决异常 !No mapping found for HTTP request with URI
-
如何解决“ No mapping found for HTTP request with URI [XXX] in DispatcherServlet with name 'XXX' ”
-
警告: No mapping found for HTTP request with URI [/springmvc-01/helloworld] in DispatcherServlet with
-
No mapping found for HTTP request with URI [/xxx/xxx] in DispatcherServlet with name 'xxx'
-
No mapping found for HTTP request with URI [...] in DispatcherServlet with name ‘DispatcherServlet‘
-
No mapping found for HTTP request with URI [***.html] in DispatcherServlet with name "***"
-
No mapping found for HTTP request with URI [/HelloWeb/] in DispatcherServlet with name 'HelloWeb...
-
No mapping found for HTTP request with URI [/app17a/] in DispatcherServlet with name 'springmvc'解决方法