<?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"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
		http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd
		http://www.springframework.org/schema/aop
		http://www.springframework.org/schema/aop/spring-aop-3.1.xsd">

	<!-- mvc 驱动 -->
	<mvc:annotation-driven />
	
	<!-- 自动扫描且只扫描@Controller -->
	<context:component-scan base-package="cn.com.liandisys.ycjt.ggcx.*"
		use-default-filters="false">
		<context:include-filter type="annotation"
			expression="org.springframework.stereotype.Controller" />
	</context:component-scan>
	
	<mvc:view-controller path="/" view-name="redirect:/main" />
	
	<mvc:view-controller path="/admin" view-name="redirect:/admin/main" />
	
	<mvc:resources mapping="/assets/**" location="/assets/" />
	
	<bean id="multipartResolver" class="com.youth.controller.fileupload.MultipartListenerResolver">  
    <!-- 设置上传文件的最大尺寸为100M -->
    <property name="maxUploadSize" value="1024000"/>
    <property name="maxInMemorySize" value="4096"/>
    <property name="defaultEncoding" value="UTF-8"/>
    <property name="resolveLazily" value="true"/>  
</bean>
	
	<!-- 视图解析器 -->
	<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
		<property name="prefix" value="/WEB-INF/views/"></property>
		<property name="suffix" value=".jsp"></property>
	</bean>

</beans>