springmvc报404错误No mapping found for HTTP request with URI [/mavenSpringmvc/requesttest] in Dispatche

弱龄寄事外,委怀在琴书。这篇文章主要讲述springmvc报404错误No mapping found for HTTP request with URI [/mavenSpringmvc/requesttest] in Dispatche相关的知识,希望能为你提供帮助。
 
问题404错误的原因有很多种
有这种,后边不带url的

springmvc报404错误No mapping found for HTTP request with URI [/mavenSpringmvc/requesttest] in Dispatche

文章图片

这种一般就是没有进入到controller中
可以在toncat中看到信息
 
十一月 12, 2018 12:21:25 下午 org.springframework.web.servlet.DispatcherServlet noHandlerFound
警告: No mapping found for HTTP request with URI [/mavenSpringmvc/requesttest] in DispatcherServlet with name \'spring\'
 
查看controller
springmvc报404错误No mapping found for HTTP request with URI [/mavenSpringmvc/requesttest] in Dispatche

文章图片

请求确实无法匹配
修改为
springmvc报404错误No mapping found for HTTP request with URI [/mavenSpringmvc/requesttest] in Dispatche

文章图片

问题解决
【springmvc报404错误No mapping found for HTTP request with URI [/mavenSpringmvc/requesttest] in Dispatche】 

    推荐阅读