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

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

	<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="locations">
			<list>
				<value>classpath:application.properties</value>
			</list>
		</property>
	</bean>
	<bean id="proper" class="org.springframework.beans.factory.config.PropertiesFactoryBean">
	   <property name="locations">
	       <array>
	          <value>classpath:application.properties</value>
	       </array>
	   </property>
	</bean>
	
	<!-- ======================================== database hana =================================================== -->
	<!-- 数据源 -->
	<bean id="hanaDataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
		<!-- 数据库基本信息配置 -->
		<property name="url" value="${druid.hana.url}" />
		<property name="username" value="${druid.hana.username}" />
		<property name="password" value="${druid.hana.password}" />
		<property name="driverClassName" value="${druid.hana.driverClassName}" />

		<!-- 初始化连接数量 -->
		<property name="initialSize" value="${druid.hana.initialSize}" />
		<!-- 最小空闲连接数 -->
		<property name="minIdle" value="${druid.hana.minIdle}" />
		<!-- 最大并发连接数 -->
		<property name="maxActive" value="${druid.hana.maxActive}" />
		<!-- 配置获取连接等待超时的时间 -->
		<property name="maxWait" value="${druid.hana.maxWait}" />

		<!-- 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒 -->
		<property name="timeBetweenEvictionRunsMillis" value="${druid.hana.timeBetweenEvictionRunsMillis}" />

		<!-- 配置一个连接在池中最小生存的时间，单位是毫秒 -->
		<property name="minEvictableIdleTimeMillis" value="${druid.hana.minEvictableIdleTimeMillis}" />
		<property name="validationQuery" value="${druid.hana.validationQuery}" />
		<property name="testWhileIdle" value="${druid.hana.testWhileIdle}" />
		<property name="testOnBorrow" value="${druid.hana.testOnBorrow}" />
		<property name="testOnReturn" value="${druid.hana.testOnReturn}" />

		<!-- 打开PSCache，并且指定每个连接上PSCache的大小 如果用Oracle，则把poolPreparedStatements配置为true，mysql可以配置为false。 -->
		<property name="poolPreparedStatements" value="${druid.hana.poolPreparedStatements}" />
		<property name="maxPoolPreparedStatementPerConnectionSize" value="${druid.hana.maxPoolPreparedStatementPerConnectionSize}" />

		<property name="keepAlive" value="true" />
		<property name="removeAbandoned" value="true" />
		<property name="removeAbandonedTimeoutMillis" value="80000" />
		<property name="logAbandoned" value="true" />
		
	    <property name="filters" value="stat,slf4j,config" />
	    <property name="proxyFilters">
	        <list>
	            <ref bean="stat-filter" />
	        </list>
	    </property>
    	<property name="timeBetweenLogStatsMillis" value="120000" />
	</bean>

	<bean id="hanaSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
		<property name="dataSource" ref="hanaDataSource" />
		<property name="configLocation" value="classpath:/mybatis/mybatis-config.xml" />
		<property name="mapperLocations" value="${druid.hana.mapper}" />
		<property name="typeAliasesPackage" value="com.huazheng.project.hana.model" />
	</bean>

	<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
		<property name="basePackage" value="com.huazheng.project.hana.mapper" />
		<property name="sqlSessionFactoryBeanName" value="hanaSqlSessionFactory" />
	</bean>
	
	<!-- ======================================== database mysql =================================================== -->
	<!-- 数据源 -->
	<bean id="mysqlDataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
		<!-- 数据库基本信息配置 -->
		<property name="url" value="${druid.mysql.url}" />
		<property name="username" value="${druid.mysql.username}" />
		<property name="password" value="${druid.mysql.password}" />
		<property name="driverClassName" value="${druid.mysql.driverClassName}" />

		<!-- 初始化连接数量 -->
		<property name="initialSize" value="${druid.mysql.initialSize}" />
		<!-- 最小空闲连接数 -->
		<property name="minIdle" value="${druid.mysql.minIdle}" />
		<!-- 最大并发连接数 -->
		<property name="maxActive" value="${druid.mysql.maxActive}" />
		<!-- 配置获取连接等待超时的时间 -->
		<property name="maxWait" value="${druid.mysql.maxWait}" />

		<!-- 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒 -->
		<property name="timeBetweenEvictionRunsMillis" value="${druid.mysql.timeBetweenEvictionRunsMillis}" />

		<!-- 配置一个连接在池中最小生存的时间，单位是毫秒 -->
		<property name="minEvictableIdleTimeMillis" value="${druid.mysql.minEvictableIdleTimeMillis}" />
		<property name="validationQuery" value="${druid.mysql.validationQuery}" />
		<property name="testWhileIdle" value="${druid.mysql.testWhileIdle}" />
		<property name="testOnBorrow" value="${druid.mysql.testOnBorrow}" />
		<property name="testOnReturn" value="${druid.mysql.testOnReturn}" />

		<!-- 打开PSCache，并且指定每个连接上PSCache的大小 如果用Oracle，则把poolPreparedStatements配置为true，mysql可以配置为false。 -->
		<property name="poolPreparedStatements" value="${druid.mysql.poolPreparedStatements}" />
		<property name="maxPoolPreparedStatementPerConnectionSize" value="${druid.mysql.maxPoolPreparedStatementPerConnectionSize}" />

		<property name="keepAlive" value="true" />
		<property name="removeAbandoned" value="true" />
		<property name="removeAbandonedTimeoutMillis" value="80000" />
		<property name="logAbandoned" value="true" />
		
	    <property name="filters" value="stat,slf4j,config" />
	    <property name="proxyFilters">
	        <list>
	            <ref bean="stat-filter" />
	        </list>
	    </property>
    	<property name="timeBetweenLogStatsMillis" value="120000" />
	</bean>

	<bean id="mysqlSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
		<property name="dataSource" ref="mysqlDataSource" />
		<property name="configLocation" value="classpath:/mybatis/mybatis-config.xml" />
		<property name="mapperLocations" value="${druid.mysql.mapper}" />
		<property name="typeAliasesPackage" value="com.huazheng.project.mysql.model" />
	</bean>

	<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
		<property name="basePackage" value="com.huazheng.project.mysql.mapper" />
		<property name="sqlSessionFactoryBeanName" value="mysqlSqlSessionFactory" />
	</bean>
	
	<!-- ======================================== database mssql =================================================== -->
	<!-- 数据源 -->
	<bean id="mssqlDataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
		<!-- 数据库基本信息配置 -->
		<property name="url" value="${druid.mssql.url}" />
		<property name="username" value="${druid.mssql.username}" />
		<property name="password" value="${druid.mssql.password}" />
		<property name="driverClassName" value="${druid.mssql.driverClassName}" />

		<!-- 初始化连接数量 -->
		<property name="initialSize" value="${druid.mssql.initialSize}" />
		<!-- 最小空闲连接数 -->
		<property name="minIdle" value="${druid.mssql.minIdle}" />
		<!-- 最大并发连接数 -->
		<property name="maxActive" value="${druid.mssql.maxActive}" />
		<!-- 配置获取连接等待超时的时间 -->
		<property name="maxWait" value="${druid.mssql.maxWait}" />

		<!-- 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒 -->
		<property name="timeBetweenEvictionRunsMillis" value="${druid.mssql.timeBetweenEvictionRunsMillis}" />

		<!-- 配置一个连接在池中最小生存的时间，单位是毫秒 -->
		<property name="minEvictableIdleTimeMillis" value="${druid.mssql.minEvictableIdleTimeMillis}" />
		<property name="validationQuery" value="${druid.mssql.validationQuery}" />
		<property name="testWhileIdle" value="${druid.mssql.testWhileIdle}" />
		<property name="testOnBorrow" value="${druid.mssql.testOnBorrow}" />
		<property name="testOnReturn" value="${druid.mssql.testOnReturn}" />

		<!-- 打开PSCache，并且指定每个连接上PSCache的大小 如果用Oracle，则把poolPreparedStatements配置为true，mysql可以配置为false。 -->
		<property name="poolPreparedStatements" value="${druid.mssql.poolPreparedStatements}" />
		<property name="maxPoolPreparedStatementPerConnectionSize" value="${druid.mssql.maxPoolPreparedStatementPerConnectionSize}" />

		<property name="keepAlive" value="true" />
		<property name="removeAbandoned" value="true" />
		<property name="removeAbandonedTimeoutMillis" value="80000" />
		<property name="logAbandoned" value="true" />
		
	    <property name="filters" value="stat,slf4j,config" />
	    <property name="proxyFilters">
	        <list>
	            <ref bean="stat-filter" />
	        </list>
	    </property>
    	<property name="timeBetweenLogStatsMillis" value="120000" />
	</bean>

	<bean id="mssqlSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
		<property name="dataSource" ref="mssqlDataSource" />
		<property name="configLocation" value="classpath:/mybatis/mybatis-config.xml" />
		<property name="mapperLocations" value="${druid.mssql.mapper}" />
		<property name="typeAliasesPackage" value="com.huazheng.project.mssql.model" />
	</bean>

	<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
		<property name="basePackage" value="com.huazheng.project.mssql.mapper" />
		<property name="sqlSessionFactoryBeanName" value="mssqlSqlSessionFactory" />
	</bean>
	
	<!-- ======================================== database mssql2 =================================================== -->
	<!-- 数据源 -->
	<bean id="mssql2DataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
		<!-- 数据库基本信息配置 -->
		<property name="url" value="${druid.mssql2.url}" />
		<property name="username" value="${druid.mssql2.username}" />
		<property name="password" value="${druid.mssql2.password}" />
		<property name="driverClassName" value="${druid.mssql2.driverClassName}" />

		<!-- 初始化连接数量 -->
		<property name="initialSize" value="${druid.mssql2.initialSize}" />
		<!-- 最小空闲连接数 -->
		<property name="minIdle" value="${druid.mssql2.minIdle}" />
		<!-- 最大并发连接数 -->
		<property name="maxActive" value="${druid.mssql2.maxActive}" />
		<!-- 配置获取连接等待超时的时间 -->
		<property name="maxWait" value="${druid.mssql2.maxWait}" />

		<!-- 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒 -->
		<property name="timeBetweenEvictionRunsMillis" value="${druid.mssql2.timeBetweenEvictionRunsMillis}" />

		<!-- 配置一个连接在池中最小生存的时间，单位是毫秒 -->
		<property name="minEvictableIdleTimeMillis" value="${druid.mssql2.minEvictableIdleTimeMillis}" />
		<property name="validationQuery" value="${druid.mssql2.validationQuery}" />
		<property name="testWhileIdle" value="${druid.mssql2.testWhileIdle}" />
		<property name="testOnBorrow" value="${druid.mssql2.testOnBorrow}" />
		<property name="testOnReturn" value="${druid.mssql2.testOnReturn}" />

		<!-- 打开PSCache，并且指定每个连接上PSCache的大小 如果用Oracle，则把poolPreparedStatements配置为true，mysql可以配置为false。 -->
		<property name="poolPreparedStatements" value="${druid.mssql2.poolPreparedStatements}" />
		<property name="maxPoolPreparedStatementPerConnectionSize" value="${druid.mssql2.maxPoolPreparedStatementPerConnectionSize}" />

		<property name="keepAlive" value="true" />
		<property name="removeAbandoned" value="true" />
		<property name="removeAbandonedTimeoutMillis" value="80000" />
		<property name="logAbandoned" value="true" />
		
	    <property name="filters" value="stat,slf4j,config" />
	    <property name="proxyFilters">
	        <list>
	            <ref bean="stat-filter" />
	        </list>
	    </property>
    	<property name="timeBetweenLogStatsMillis" value="120000" />
	</bean>

	<bean id="mssql2SqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
		<property name="dataSource" ref="mssql2DataSource" />
		<property name="configLocation" value="classpath:/mybatis/mybatis-config.xml" />
		<property name="mapperLocations" value="${druid.mssql2.mapper}" />
		<property name="typeAliasesPackage" value="com.huazheng.project.mssql2.model" />
	</bean>

	<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
		<property name="basePackage" value="com.huazheng.project.mssql2.mapper" />
		<property name="sqlSessionFactoryBeanName" value="mssql2SqlSessionFactory" />
	</bean>
	
	<!-- ======================================== database mssql3 =================================================== -->
	<!-- 数据源 -->
	<bean id="mssql3DataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
		<!-- 数据库基本信息配置 -->
		<property name="url" value="${druid.mssql3.url}" />
		<property name="username" value="${druid.mssql3.username}" />
		<property name="password" value="${druid.mssql3.password}" />
		<property name="driverClassName" value="${druid.mssql3.driverClassName}" />

		<!-- 初始化连接数量 -->
		<property name="initialSize" value="${druid.mssql3.initialSize}" />
		<!-- 最小空闲连接数 -->
		<property name="minIdle" value="${druid.mssql3.minIdle}" />
		<!-- 最大并发连接数 -->
		<property name="maxActive" value="${druid.mssql3.maxActive}" />
		<!-- 配置获取连接等待超时的时间 -->
		<property name="maxWait" value="${druid.mssql3.maxWait}" />

		<!-- 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒 -->
		<property name="timeBetweenEvictionRunsMillis" value="${druid.mssql3.timeBetweenEvictionRunsMillis}" />

		<!-- 配置一个连接在池中最小生存的时间，单位是毫秒 -->
		<property name="minEvictableIdleTimeMillis" value="${druid.mssql3.minEvictableIdleTimeMillis}" />
		<property name="validationQuery" value="${druid.mssql3.validationQuery}" />
		<property name="testWhileIdle" value="${druid.mssql3.testWhileIdle}" />
		<property name="testOnBorrow" value="${druid.mssql3.testOnBorrow}" />
		<property name="testOnReturn" value="${druid.mssql3.testOnReturn}" />

		<!-- 打开PSCache，并且指定每个连接上PSCache的大小 如果用Oracle，则把poolPreparedStatements配置为true，mysql可以配置为false。 -->
		<property name="poolPreparedStatements" value="${druid.mssql3.poolPreparedStatements}" />
		<property name="maxPoolPreparedStatementPerConnectionSize" value="${druid.mssql3.maxPoolPreparedStatementPerConnectionSize}" />

		<property name="keepAlive" value="true" />
		<property name="removeAbandoned" value="true" />
		<property name="removeAbandonedTimeoutMillis" value="80000" />
		<property name="logAbandoned" value="true" />
		
	    <property name="filters" value="stat,slf4j,config" />
	    <property name="proxyFilters">
	        <list>
	            <ref bean="stat-filter" />
	        </list>
	    </property>
    	<property name="timeBetweenLogStatsMillis" value="120000" />
	</bean>

	<bean id="mssql3SqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
		<property name="dataSource" ref="mssql3DataSource" />
		<property name="configLocation" value="classpath:/mybatis/mybatis-config.xml" />
		<property name="mapperLocations" value="${druid.mssql3.mapper}" />
		<property name="typeAliasesPackage" value="com.huazheng.project.mssql3.model" />
	</bean>

	<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
		<property name="basePackage" value="com.huazheng.project.mssql3.mapper" />
		<property name="sqlSessionFactoryBeanName" value="mssql3SqlSessionFactory" />
	</bean>
	
	<!-- ======================================== database mssql4 =================================================== -->
	<!-- 数据源 -->
	<bean id="mssql4DataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
		<!-- 数据库基本信息配置 -->
		<property name="url" value="${druid.mssql4.url}" />
		<property name="username" value="${druid.mssql4.username}" />
		<property name="password" value="${druid.mssql4.password}" />
		<property name="driverClassName" value="${druid.mssql4.driverClassName}" />

		<!-- 初始化连接数量 -->
		<property name="initialSize" value="${druid.mssql4.initialSize}" />
		<!-- 最小空闲连接数 -->
		<property name="minIdle" value="${druid.mssql4.minIdle}" />
		<!-- 最大并发连接数 -->
		<property name="maxActive" value="${druid.mssql4.maxActive}" />
		<!-- 配置获取连接等待超时的时间 -->
		<property name="maxWait" value="${druid.mssql4.maxWait}" />

		<!-- 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒 -->
		<property name="timeBetweenEvictionRunsMillis" value="${druid.mssql4.timeBetweenEvictionRunsMillis}" />

		<!-- 配置一个连接在池中最小生存的时间，单位是毫秒 -->
		<property name="minEvictableIdleTimeMillis" value="${druid.mssql4.minEvictableIdleTimeMillis}" />
		<property name="validationQuery" value="${druid.mssql4.validationQuery}" />
		<property name="testWhileIdle" value="${druid.mssql4.testWhileIdle}" />
		<property name="testOnBorrow" value="${druid.mssql4.testOnBorrow}" />
		<property name="testOnReturn" value="${druid.mssql4.testOnReturn}" />

		<!-- 打开PSCache，并且指定每个连接上PSCache的大小 如果用Oracle，则把poolPreparedStatements配置为true，mysql可以配置为false。 -->
		<property name="poolPreparedStatements" value="${druid.mssql4.poolPreparedStatements}" />
		<property name="maxPoolPreparedStatementPerConnectionSize" value="${druid.mssql4.maxPoolPreparedStatementPerConnectionSize}" />

		<property name="keepAlive" value="true" />
		<property name="removeAbandoned" value="true" />
		<property name="removeAbandonedTimeoutMillis" value="80000" />
		<property name="logAbandoned" value="true" />
		
	    <property name="filters" value="stat,slf4j,config" />
	    <property name="proxyFilters">
	        <list>
	            <ref bean="stat-filter" />
	        </list>
	    </property>
    	<property name="timeBetweenLogStatsMillis" value="120000" />
	</bean>

	<bean id="mssql4SqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
		<property name="dataSource" ref="mssql4DataSource" />
		<property name="configLocation" value="classpath:/mybatis/mybatis-config.xml" />
		<property name="mapperLocations" value="${druid.mssql4.mapper}" />
		<property name="typeAliasesPackage" value="com.huazheng.project.mssql4.model" />
	</bean>

	<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
		<property name="basePackage" value="com.huazheng.project.mssql4.mapper" />
		<property name="sqlSessionFactoryBeanName" value="mssql4SqlSessionFactory" />
	</bean>
	
	<!-- ======================================== database greenplum =================================================== -->
	<!-- 数据源 -->
	<bean id="greenplumDataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
		<!-- 数据库基本信息配置 -->
		<property name="url" value="${druid.greenplum.url}" />
		<property name="username" value="${druid.greenplum.username}" />
		<property name="password" value="${druid.greenplum.password}" />
		<property name="driverClassName" value="${druid.greenplum.driverClassName}" />

		<!-- 初始化连接数量 -->
		<property name="initialSize" value="${druid.greenplum.initialSize}" />
		<!-- 最小空闲连接数 -->
		<property name="minIdle" value="${druid.greenplum.minIdle}" />
		<!-- 最大并发连接数 -->
		<property name="maxActive" value="${druid.greenplum.maxActive}" />
		<!-- 配置获取连接等待超时的时间 -->
		<property name="maxWait" value="${druid.greenplum.maxWait}" />
    
		<!-- 配置间隔多久才进行一次检测，检测需要关闭的空闲连接，单位是毫秒 -->
		<property name="timeBetweenEvictionRunsMillis" value="${druid.greenplum.timeBetweenEvictionRunsMillis}" />

		<!-- 配置一个连接在池中最小生存的时间，单位是毫秒 -->
		<property name="minEvictableIdleTimeMillis" value="${druid.greenplum.minEvictableIdleTimeMillis}" />
		<property name="validationQuery" value="${druid.greenplum.validationQuery}" />
		<property name="testWhileIdle" value="${druid.greenplum.testWhileIdle}" />
		<property name="testOnBorrow" value="${druid.greenplum.testOnBorrow}" />
		<property name="testOnReturn" value="${druid.greenplum.testOnReturn}" />

		<!-- 打开PSCache，并且指定每个连接上PSCache的大小 如果用Oracle，则把poolPreparedStatements配置为true，mysql可以配置为false。 -->
		<property name="poolPreparedStatements" value="${druid.greenplum.poolPreparedStatements}" />
		<property name="maxPoolPreparedStatementPerConnectionSize" value="${druid.greenplum.maxPoolPreparedStatementPerConnectionSize}" />
		
		<property name="keepAlive" value="true" />
		<property name="removeAbandoned" value="true" />
		<property name="removeAbandonedTimeoutMillis" value="80000" />
		<property name="logAbandoned" value="true" />
		
	    <property name="filters" value="stat,slf4j,config" />
	    <property name="proxyFilters">
	        <list>
	            <ref bean="stat-filter" />
	        </list>
	    </property>
    	<property name="timeBetweenLogStatsMillis" value="120000" />
	</bean>

	<bean id="greenplumSqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
		<property name="dataSource" ref="greenplumDataSource" />
		<property name="configLocation" value="classpath:/mybatis/mybatis-config.xml" />
		<property name="mapperLocations" value="${druid.greenplum.mapper}" />
<!-- 		<property name="typeAliasesPackage" value="com.huazheng.project.greenplum.model" /> -->
	</bean>

	<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
		<property name="basePackage" value="com.huazheng.project.greenplum.mapper" />
		<property name="sqlSessionFactoryBeanName" value="greenplumSqlSessionFactory" />
	</bean>
	
	<!-- ======================================== common ================================================== -->
	<bean id="stat-filter" class="com.alibaba.druid.filter.stat.StatFilter">
	    <property name="slowSqlMillis" value="10000" />
	    <property name="logSlowSql" value="true" />
	</bean>
	
	<!-- ======================================== redis =================================================== -->
	<!-- 定义连接池 -->
	<bean id="jedisPoolConfig" class="redis.clients.jedis.JedisPoolConfig">
		<property name="maxTotal" value="${redis.maxTotal}" />
		<property name="maxIdle" value="${redis.maxIdle}" />
		<property name="MaxWaitMillis" value="${redis.maxWaitMillis}" />
		<property name="testOnBorrow" value="true" />
	</bean>

	<!-- 定义连接工厂 -->
	<bean id="jedisConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">
		<property name="hostName" value="${redis.hostName}" />
		<property name="port" value="${redis.port}" />
		<property name="database" value="${redis.database}" />
		<property name="usePool" value="true" />
		<property name="poolConfig" ref="jedisPoolConfig" />
	</bean>
	
	<!-- 定义模板 -->
	<bean id="redisTemplate" class="org.springframework.data.redis.core.RedisTemplate">
		<property name="connectionFactory" ref="jedisConnectionFactory" />
		<property name="keySerializer">
			<bean class="org.springframework.data.redis.serializer.StringRedisSerializer" />
		</property>
		<property name="valueSerializer">
			<bean class="org.springframework.data.redis.serializer.StringRedisSerializer" />
		</property>
		<property name="hashKeySerializer">
			<bean class="org.springframework.data.redis.serializer.StringRedisSerializer" />
		</property>
		<property name="hashValueSerializer">
			<bean class="org.springframework.data.redis.serializer.StringRedisSerializer" />
		</property>
	</bean>
	
	<bean id="jedis1ConnectionFactory" class="org.springframework.data.redis.connection.jedis.JedisConnectionFactory">
		<property name="hostName" value="${redis.hostName}" />
		<property name="port" value="${redis.port}" />
		<property name="database" value="${redis1.database}" />
		<property name="usePool" value="true" />
		<property name="poolConfig" ref="jedisPoolConfig" />
	</bean>
	
	<!-- 定义模板 -->
	<bean id="redis1Template" class="org.springframework.data.redis.core.RedisTemplate">
		<property name="connectionFactory" ref="jedis1ConnectionFactory" />
		<property name="keySerializer">
			<bean class="org.springframework.data.redis.serializer.StringRedisSerializer" />
		</property>
		<property name="valueSerializer">
			<bean class="org.springframework.data.redis.serializer.StringRedisSerializer" />
		</property>
		<property name="hashKeySerializer">
			<bean class="org.springframework.data.redis.serializer.StringRedisSerializer" />
		</property>
		<property name="hashValueSerializer">
			<bean class="org.springframework.data.redis.serializer.StringRedisSerializer" />
		</property>
	</bean>
	
	
	<bean id="redisCacheWriter" class="org.springframework.data.redis.cache.DefaultRedisCacheWriter">
		<constructor-arg name="connectionFactory" ref="jedisConnectionFactory"/>
	</bean>
	<bean id="defaultRedisCacheConfiguration" class="org.springframework.data.redis.cache.RedisCacheConfiguration" factory-method="defaultCacheConfig" />

	<bean id="defaultRedisCache" class="org.springframework.data.redis.cache.RedisCache">
		<constructor-arg name="name" value="huazheng"/>
		<constructor-arg name="cacheWriter" ref="redisCacheWriter"/>
		<constructor-arg name="cacheConfig" ref="defaultRedisCacheConfiguration"/>
	</bean>

	<bean id="hanaRedisCache" class="org.springframework.data.redis.cache.RedisCache">
		<constructor-arg name="name" value="hana"/>
		<constructor-arg name="cacheWriter" ref="redisCacheWriter"/>
		<constructor-arg name="cacheConfig" ref="defaultRedisCacheConfiguration"/>
	</bean>
	
	<bean id="redisCacheManager" class="org.springframework.cache.support.SimpleCacheManager" >
		<property name="caches" >
			<set>
				<ref bean="defaultRedisCache" />
				<ref bean="hanaRedisCache" />
			</set>
		</property>
	</bean>
    
	<cache:annotation-driven cache-manager="redisCacheManager" />

	<bean id="quartzScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean">
		<property name="applicationContextSchedulerContextKey" value="applicationContextKey" />
		<property name="configLocation" value="classpath:quartz.properties" />
		<property name="startupDelay" value="30" />
		<property name="overwriteExistingJobs" value="true" />
		<property name="schedulerName" value="Mscheduler" />
		<property name="autoStartup" value="true" />
		<property name="triggers" ref="jobList" />
	</bean>

	<bean id="methodJobDetail" class="org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean" abstract="true">
		<property name="concurrent" value="false" />
	</bean>
	
	<bean id="jobList" class="java.util.ArrayList">
		<constructor-arg>
			<list>
				<!-- ========================== jobServiceImpl ========================== -->
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="jobServiceImpl" />
							<property name="targetMethod" value="checkJob1" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="jobServiceImpl" />
							<property name="targetMethod" value="checkJob2" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="jobServiceImpl" />
							<property name="targetMethod" value="checkJob3" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="jobServiceImpl" />
							<property name="targetMethod" value="checkJob4" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="jobServiceImpl" />
							<property name="targetMethod" value="checkJob5" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				
				<!-- ========================== otherJobServiceImpl ========================== -->
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="otherJobServiceImpl" />
							<property name="targetMethod" value="caPersonComp" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="otherJobServiceImpl" />
							<property name="targetMethod" value="caPayment" />
						</bean>
					</property>
					<property name="cronExpression" value="0 5/10 * * * ?" />
				</bean>
				
				<!-- ========================== deleteUpdateJobServiceImpl ========================== -->
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="deleteUpdateJobServiceImpl" />
							<property name="targetMethod" value="checkJob1" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="deleteUpdateJobServiceImpl" />
							<property name="targetMethod" value="checkJob2" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="deleteUpdateJobServiceImpl" />
							<property name="targetMethod" value="checkJob3" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="deleteUpdateJobServiceImpl" />
							<property name="targetMethod" value="checkJob4" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="deleteUpdateJobServiceImpl" />
							<property name="targetMethod" value="checkJob5" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="deleteUpdateJobServiceImpl" />
							<property name="targetMethod" value="checkJob6" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="deleteUpdateJobServiceImpl" />
							<property name="targetMethod" value="checkJob7" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="deleteUpdateJobServiceImpl" />
							<property name="targetMethod" value="checkJob8" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				
				
				<!-- ========================== deleteUpdateJobServiceImpl busy ========================== -->
				<bean class="org.springframework.scheduling.quartz.CronTriggerFactoryBean">
					<property name="jobDetail">
						<bean parent="methodJobDetail">
							<property name="targetObject" ref="deleteUpdateJobServiceImpl" />
							<property name="targetMethod" value="checkBusy" />
						</bean>
					</property>
					<property name="cronExpression" value="* * * * * ?" />
				</bean>
				
				
			</list>
		</constructor-arg>
	</bean>
	
</beans>
