58 lines
2.0 KiB
XML
58 lines
2.0 KiB
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:context="http://www.springframework.org/schema/context"
|
|
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
|
xsi:schemaLocation="
|
|
http://www.springframework.org/schema/mvc
|
|
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
|
|
http://www.springframework.org/schema/beans
|
|
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
|
http://www.springframework.org/schema/context
|
|
http://www.springframework.org/schema/context/spring-context-4.0.xsd
|
|
">
|
|
<context:annotation-config />
|
|
<!-- 扫描所有的 controller -->
|
|
<context:component-scan base-package="sc545.pay" />
|
|
|
|
<!-- 将静态资源交于默认的servlet处理 -->
|
|
<mvc:default-servlet-handler />
|
|
|
|
<!-- 启动注解驱动 SpringMVC 功能 -->
|
|
<mvc:annotation-driven />
|
|
|
|
|
|
<bean
|
|
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
|
<property name="prefix" value="/" /> <!-- controller 返回的网页地址根目录 -->
|
|
<!-- <property name="suffix" value=".jsp" /> -->
|
|
|
|
</bean>
|
|
|
|
<bean id="multipartResolver"
|
|
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
|
<property name="defaultEncoding" value="utf-8"></property>
|
|
<property name="maxUploadSize" value="10485760000"></property>
|
|
<property name="maxInMemorySize" value="40960"></property>
|
|
</bean>
|
|
|
|
|
|
|
|
<!-- 配置静态资源 -->
|
|
<mvc:resources location="/" mapping="/**/*.js" />
|
|
<mvc:resources location="/" mapping="/**/*.css" />
|
|
<mvc:resources location="/assets/" mapping="/assets/**/*" />
|
|
<mvc:resources location="/images/" mapping="/images/*"
|
|
cache-period="360000" />
|
|
|
|
<mvc:interceptors>
|
|
<mvc:interceptor>
|
|
<mvc:mapping path="/**" />
|
|
<bean class="sc545.pay.interceptor.testInterceptor" />
|
|
</mvc:interceptor>
|
|
|
|
</mvc:interceptors>
|
|
|
|
|
|
</beans>
|