1、整合原理
- 在SpringMVC配置文件中配置MVC注解解析器、静态资源页面放行、视图解析器、拦截器
- 在web.xml中配置SpringMVC的前端控制器、MVC的编码过滤器
- 在SpringMVC配置文件中引入Spring的配置文件
- Spring配置文件照常配置
2、整合实现
2.1 SpringMVC配置文件(springmvc.xml)
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-m