- 修改Spring MVC对应配置文件,添加mvc命名空间和约束
- 添加处理标签
命名空间添加
xmlns:mvc="http://www.springframework.org/schema/mvc"
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd
处理标签
mapping:文件位置
location:使用时的路径
<mvc:annotation-driven/><!--注解驱动-->
<mvc:resources mapping="/css/**" location="/css/"></mvc:resources>
<mvc:resources mapping="/img/**" location="/img/"></mvc:resources>