1. 程式人生 > >springmvc報404錯誤No mapping found for HTTP request with URI [/mavenSpringmvc/requesttest] in DispatcherServlet with name 'spring'

springmvc報404錯誤No mapping found for HTTP request with URI [/mavenSpringmvc/requesttest] in DispatcherServlet with name 'spring'

for 404錯誤 com web and uri pat con 題解

問題404錯誤的原因有很多種

有這種,後邊不帶url的

技術分享圖片

這種一般就是沒有進入到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 DispatcherServlet with name 'spring'