1. 程式人生 > 其它 >PageNotFound.noHandlerFound No mapping found for HTTP request with URI

PageNotFound.noHandlerFound No mapping found for HTTP request with URI

技術標籤:spring

學習SpringMVC接收引數,不小心配置xml檔案包名出錯。瀏覽器訪問出現以下報錯,
在這裡插入圖片描述後端提示:

org.springframework.web.servlet.PageNotFound.noHandlerFound No mapping found for HTTP request with URI [/param/test] in DispatcherServlet with name 'springMVC'

可能的問題是沒有掃描包
找到resourse目錄下的xml配置檔案(以上springMVC.xml
配置檔案),檢查訪問所在的包是否被掃描,

<
!--開啟註解掃描--> <context:component-scan base-package="com.project"></context:component-scan>