<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:context="http://www.springframework.org/schema/context"
	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/context
       http://www.springframework.org/schema/context/spring-context.xsd
       http://www.springframework.org/schema/aop 
       http://www.springframework.org/schema/aop/spring-aop.xsd
       http://www.springframework.org/schema/mvc
       http://www.springframework.org/schema/mvc/spring-mvc.xsd">

	<bean id="placeholder" class="com.lyms.spring.PropertiesUtil">
		<property name="locations">
			<list>
				<value>classpath:conf.properties</value>
				<value>classpath:jdbc.properties</value>
				<value>classpath:redis.properties</value>
			</list> 
		</property>
	</bean>

	<context:component-scan base-package="com.lyms" />

	<!-- 
	<mvc:resources mapping="/static/**" location="/WEB-INF/static/" cache-period="31926534">
		<mvc:resource-chain resource-cache="false" auto-registration="false">
			<mvc:resolvers>
	        	<bean class="org.springframework.web.servlet.resource.GzipResourceResolver"/>
	        	<bean class="org.springframework.web.servlet.resource.PathResourceResolver"/>
	        </mvc:resolvers>
        </mvc:resource-chain>
	</mvc:resources>
	<mvc:resources mapping="/error/**" location="/error/" />
	 -->
	<!-- swagger2 -->
	<bean class="com.lyms.hospital.conf.SwaggerConfig"></bean>
	<mvc:resources location="classpath:/META-INF/resources/" mapping="swagger-ui.html"/>
    <mvc:resources location="classpath:/META-INF/resources/webjars/" mapping="/webjars/**"/>

	<bean id="ExceptionHandler" class="com.lyms.spring.exception.ExceptionHandler" />
	
	<bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
		<property name="defaultEncoding" value="utf-8" />
		<!-- 文件大小最大值 -->
		<property name="maxUploadSize" value="10485760000" />
		<!-- 内存中的最大值 -->
		<property name="maxInMemorySize" value="40960" />
	</bean>
	
	<aop:aspectj-autoproxy/>  
	
	<bean class = "com.lyms.aop.SysLogAop"/>  
	
	<mvc:interceptors>
		<bean id="tokenValidateInteceptor" class="com.lyms.hospital.inteceptor.TokenValidateInteceptor"/>
	</mvc:interceptors>
	
	<import resource="xml/app-*.xml" />
</beans>