<?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"
       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">

    <!-- 根目录'/'对应页面 -->
    <mvc:view-controller path="/" view-name="/index.jsp"/>

    <!-- 拦截器配置 -->
    <mvc:interceptors>
        <!-- 后台拦截器 -->
        <mvc:interceptor>
            <!-- 拦截路径 -->
            <mvc:mapping path="/manage/**"/>
            <!-- 非拦截路径 -->
            <mvc:exclude-mapping path="/manage/login"/>
            <!-- 拦截器对象 -->
            <bean id="manageInterceptor" class="com.zheng.cms.admin.interceptor.ManageInterceptor"/>
        </mvc:interceptor>
    </mvc:interceptors>

    <!-- Jsp视图 -->
    <bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="order" value="1"/>
        <property name="prefix" value="/WEB-INF/jsp"/>
        <property name="suffix" value=""/>
        <property name="contentType" value="text/html; charset=utf-8"/>
        <property name="viewClass" value="org.springframework.web.servlet.view.JstlView"/>
    </bean>

</beans>