springmvc入门使用
代码仓库: https://gitee.com/DerekAndroid/HelloSpringMvc.git 参考: https://how2j.cn/k/springmvc/springmvc-springmvc/615.html 1.配置web.xml,使用统一的Servlet管理路径和servlet <?xml version="1.0" encoding="UTF-8"?> <web-app xmlns="http://xmlns.jcp.org/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-app_4_0.xsd" version="4.0"> <servlet-mapping> <servlet-name>default</servlet-name> <url-pattern>*.jpg</url-pattern> </servlet-mapping> <!-- 配置Spring MVC的入口 DispatcherServlet,把所有的请求都提交到该Servlet--> <servlet>