Java 中 spring-mvc.xml 文件 内容
此文件会随着时间不断更新
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.springframework.org/schema/beans"
xmlns:aop="http://www.springframework.org/schema/aop"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:tx="http://www.springframework.org/schema/tx"
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/aop
http://www.springframework.org/schema/aop/spring-aop.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd ">
<context:component-scan
base-package="com.hyd.iae.controller"></context:component-scan>
<context:component-scan
base-package="com.hyd.iae.util"></context:component-scan>
<mvc:annotation-driven></mvc:annotation-driven>
<bean
class="org.springframework.web.servlet.view.InternalResourceViewResolver">
<property name="prefix" value="/WEB-INF/jsp/"></property>
<property name="suffix" value=".jsp"></property>
</bean>
<mvc:resources location="/css/" mapping="/css/**"></mvc:resources>
<mvc:resources location="/data/" mapping="/data/**"></mvc:resources>
<mvc:resources location="/font-awesome/"
mapping="/font-awesome/**"></mvc:resources>
<mvc:resources location="/img/" mapping="/img/**"></mvc:resources>
<mvc:resources location="/js/" mapping="/js/**"></mvc:resources>
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/adminInput/**" />
<mvc:mapping path="/adminInfor/**" />
<mvc:mapping path="/adminDistr/**" />
<mvc:mapping path="/adminScore/**" />
<mvc:exclude-mapping path="/uploadFileStudent"/>
<mvc:exclude-mapping path="/uploadFileAllStudent"/>
<bean class="com.hyd.iae.interceptor.IAdministratorInterceptor"></bean>
</mvc:interceptor>
</mvc:interceptors>
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/judgeTran/**" />
<bean class="com.hyd.iae.interceptor.IJudgeInterceptor"></bean>
</mvc:interceptor>
</mvc:interceptors>
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/studentTran/**" />
<mvc:exclude-mapping path="" />
<bean class="com.hyd.iae.interceptor.IStudentInterceptor"></bean>
</mvc:interceptor>
</mvc:interceptors>
<bean id="multipartResolver"
class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
<property name="defaultEncoding" value="UTF-8"></property>
<property name="maxInMemorySize" value="1000000"></property>
<property name="resolveLazily" value="true" />
</bean>
</beans>