<?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.2.xsd
		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-4.2.xsd">
	
	<!-- springMVC的配置文件，包含网站跳转逻辑的控制，配置 -->
	
	<!-- 开启扫描注解 -->
	<context:component-scan base-package="lingtao.net" use-default-filters="false">
		<!-- 只扫描控制器 -->
		<context:include-filter type="annotation" expression="org.springframework.stereotype.Controller"/>
	</context:component-scan>

	<!-- 配置视图解析器,方便页面返回信息 -->
	<bean class="org.springframework.web.servlet.view.InternalResourceViewResolver">
		<!-- 前缀 -->
		<property name="prefix" value="/views/"></property>
		<!-- 后缀 -->
		<property name="suffix" value=".jsp"></property>		
	</bean>
	
	<!-- 两个标准配置 -->
	<!-- 将springmvc不能处理的请求交给tomcat -->
	<mvc:default-servlet-handler/>
	
	<!-- 能支持springMVC更高级的一些功能:JSR303校验，快捷的ajax...映射动态请求 -->
	<mvc:annotation-driven/>
	
	<!-- 文件上传解析器  -->
	<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver" >
		<!-- 设置文件上传的大小  -->
		<property name="maxUploadSize" value="525000000"/>
	</bean>
	
	<!-- 配置shiro开启注解支持 -->
    <bean id="lifecycleBeanPostProcessor" class="org.apache.shiro.spring.LifecycleBeanPostProcessor"/>
    
    <bean class="org.springframework.aop.framework.autoproxy.DefaultAdvisorAutoProxyCreator"
              depends-on="lifecycleBeanPostProcessor"/>
    <bean class="org.apache.shiro.spring.security.interceptor.AuthorizationAttributeSourceAdvisor">
            <property name="securityManager" ref="securityManager"/>
    </bean>
</beans>
