1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <?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:aop="http://www.springframework.org/schema/aop"
- xmlns:tx="http://www.springframework.org/schema/tx"
- 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-4.3.xsd
- http://www.springframework.org/schema/aop
- http://www.springframework.org/schema/aop/spring-aop.xsd
- http://www.springframework.org/schema/tx
- http://www.springframework.org/schema/tx/spring-tx.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd">
-
- <context:component-scan base-package="bank.controller"/>
- <context:component-scan base-package="bank.service"/>
-
- <mvc:annotation-driven/>
- <mvc:default-servlet-handler/>
- <!-- 配置登录拦截器,bank.interceptoe.LoginInterceptor.java -->
- <mvc:interceptors>
- <mvc:interceptor>
- <!-- 拦截所有请求 -->
- <mvc:mapping path="/**"/>
- <!-- 拦截/js,/css,/fonts,/images下的所有请求 -->
- <mvc:exclude-mapping path="/js/**"/>
- <mvc:exclude-mapping path="/css/**"/>
- <mvc:exclude-mapping path="/fonts/**"/>
- <mvc:exclude-mapping path="/images/**"/>
- <!-- 指定拦截器类 -->
- <bean class="bank.interceptor.LoginInterceptor"/>
- </mvc:interceptor>
- </mvc:interceptors>
- <!-- 视图解析器 -->
- <bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
- <property name="prefix" value="/WEB-INF/jsp/"/>
- <property name="suffix" value=".jsp"/>
- </bean>
-
- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
- <property name="defaultEncoding" value="utf-8"/>
- </bean>
- </beans>
|