<?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:context="http://www.springframework.org/schema/context"
       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/context http://www.springframework.org/schema/context/spring-context.xsd http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd">
    <!--配置注解扫描，这里配置是@Controller注解-->
    <context:component-scan base-package="com.bjsxt.web.controller"/>

    <!--配置注解驱动-->
    <mvc:annotation-driven/>

    <!--配置视图解析器-->
    <bean id="internalResourceViewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
        <property name="prefix" value="/WEB-INF/jsp/"/>
        <property name="suffix" value=".jsp"/>
    </bean>

    <!--静态资源映射器做静态资源放行-->
    <!--把静态资源做一个路径的映射 当请求中含有js路径时映射到/WEB-INF/js/-->
    <mvc:resources mapping="/js/**" location="/WEB-INF/js/"/>
    <!--当请求中含有img路径时映射到/WEB-INF/img/-->
    <mvc:resources mapping="/img/**" location="/WEB-INF/img/"/>
    <mvc:resources mapping="/css/**" location="/WEB-INF/css/"/>
    <mvc:resources mapping="/images/**" location="/WEB-INF/images/"/>

    <!--
    &lt;!&ndash;配置拦截器&ndash;&gt;
    <mvc:interceptors>
        <mvc:interceptor>
            &lt;!&ndash;拦截所有请求&ndash;&gt;
            <mvc:mapping path="/**"/>
            &lt;!&ndash;对于请求login.jsp和处理用户登录请求的url要放行，否则用户无法登陆，还有登录失败跳转错误页面的url也需要放行&ndash;&gt;
            <mvc:exclude-mapping path="/page/login"/>
            <mvc:exclude-mapping path="/user/userLogin"/>
            <mvc:exclude-mapping path="/page/error"/>
            &lt;!&ndash;配置拦截器&ndash;&gt;
            <bean id="loginInterceptor" class="com.bjsxt.interceptor.LoginInterceptor"/>
        </mvc:interceptor>
    </mvc:interceptors> -->

</beans>