springMVC注意事項

參考: SpringMVC訪問靜態頁面web

 

         使用@Controller註解爲何要配置<mvc:annotation-driven />spring

 

1、環境搭建

        一、選擇MyEclipse和tomcat、jdk時,安裝的版本須要對應上,如tomcat9,對應jdk8.0以上,tomcat

 

2、web項目部署

        一、使用springmvc攔截器,如項目中有靜態資源須要配置,則能夠使用「mvc:resources」進行配置。mvc

    若是出現下面的錯誤,多是沒有配置 <mvc:annotation-driven />的緣由app

    

報錯WARNING: No mapping found for HTTP request with URI [/mvc/user/findUser/lisi/770] in DispatcherServlet with name ‘springMVC’
相關文章
相關標籤/搜索