1.在使用spring和springmvc,有许多需要注意的地方.
a)spring和springmvc的整合
1)springmvc的全局异常处理器的配置
2)spring和springmvc的扫包
3)springmvc拦截器的配置
4)springmvc的欢迎页面的配置
5)静态资源的拦截
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
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-mvc.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd">
<!--配置扫描-->
<context:component-scan base-package="com.brant"></context:component-scan>
<!--加载mvc注解驱动-->
<mvc:annotation-driven/>
<import