說明:在這裏由於springmvc掃描不到需要的包接下來
警告: No mapping found for HTTP request with URI [/springmvc/user/addUser] in DispatcherServlet with name 'springMVC'
解決的方法如下:
<context:component-scan base-package="com.zpl.controller.*"></context:component-scan>這個寫錯了。沒有掃描到