<?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:task="http://www.springframework.org/schema/task"
	xmlns:context="http://www.springframework.org/schema/context"
	xmlns:aop="http://www.springframework.org/schema/aop" xmlns:cache="http://www.springframework.org/schema/cache"
	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/task 
    http://www.springframework.org/schema/task/spring-task.xsd
    http://www.springframework.org/schema/cache
    http://www.springframework.org/schema/cache/spring-cache.xsd
    http://www.springframework.org/schema/mvc 
	http://www.springframework.org/schema/mvc/spring-mvc.xsd">

	<!-- 引入属性文件 -->
	<context:property-placeholder location="classpath:config.properties,classpath:lj.properties" ignore-unresolvable="true"/>

	<!-- <bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> 
		<property name="locations"> <list> 这里支持多种寻址方式：classpath和file <value>classpath:config.properties</value> 
		<value>classpath:lj.properties</value> 推荐使用file的方式引入，这样可以将配置和代码分离 <value>file:config.properties</value> 
		<value>file:lj.properties</value> </list> </property> </bean> -->

	<!-- 自动扫描(自动注入) -->
	<context:component-scan base-package="com.fuxi.ws" />
	<!-- <context:component-scan base-package="com.fuxi.ws"> <context:exclude-filter 
		type="annotation" expression="org.springframework.stereotype.Controller" 
		/> </context:component-scan> -->
	<!-- 开启这个配置，spring才能识别@Scheduled注解 -->
	<!-- <task:executor id="executor" pool-size="5" /> <task:scheduler id="scheduler" 
		pool-size="10" /> <task:annotation-driven executor="executor" scheduler="scheduler" 
		/> -->
	<!-- <task:annotation-driven scheduler="qbScheduler" mode="proxy" /> <task:scheduler 
		id="qbScheduler" pool-size="10" /> -->
	<bean id="jsonConverter"
		class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter">
		<property name="supportedMediaTypes" value="application/json" />
	</bean>

	<!-- JDBC配置 -->
	<bean id="jabcTemplate" class="org.springframework.jdbc.core.JdbcTemplate">
		<property name="dataSource" ref="dataSource">
		</property>
	</bean>

	<!-- 配置日志拦截器 -->
	<bean id="logInterceptor" class="com.fuxi.ws.system.log.LogInterceptor"></bean>
	<aop:config proxy-target-class="true">
		<aop:aspect id="logAspectSYS" ref="logInterceptor">
			<aop:around method="invoke"
				pointcut="execution(public * com.fuxi.ws.web.controller.*.*(..))" />
		</aop:aspect>
		<aop:aspect id="logAspectSYS2" ref="logInterceptor">
			<aop:around method="invoke"
				pointcut="execution(* com.fuxi.ws.util.SMSTools.*(..))" />
		</aop:aspect>
	</aop:config>

	<bean id="taskExecutor"
		class="org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor">
		<!-- 核心线程数 -->
		<property name="corePoolSize" value="5" />
		<!-- 最大线程数 -->
		<property name="maxPoolSize" value="50" />
		<!-- 队列最大长度 -->
		<property name="queueCapacity" value="1000" />
		<!-- 线程池维护线程所允许的空闲时间，默认为60s -->
		<property name="keepAliveSeconds" value="60000" />
	</bean>
	<!-- <task:annotation-driven /> -->
</beans> 