<?xml version="1.0" encoding="GBK"?>
<beans xmlns="http://www.springframework.org/schema/beans"
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:aop="http://www.springframework.org/schema/aop"
	xmlns:tx="http://www.springframework.org/schema/tx"
	default-autowire="byName" default-lazy-init="false"
	xmlns:jee="http://www.springframework.org/schema/jee"
	xsi:schemaLocation="http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.0.xsd
		http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
		http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.0.xsd
		http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd">

	<bean id="propertyConfigurer"
		class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
		<property name="locations">
			<list>
				<value>classpath:jdbc_${SPRING_PROFILES_ACTIVE}.properties</value>
			</list>
		</property>
	</bean>
	
	<bean id="dataSource" class="com.alibaba.druid.pool.DruidDataSource" init-method="init" destroy-method="close">
		<property name="driverClassName" value="${jdbc.driverClass}" />
		<property name="url" value="${jdbc.url}" />
		<property name="username" value="${jdbc.username}" />
		<property name="password" value="${jdbc.password}" />
		<property name="initialSize" value="${cpool.initialPoolSize}"/>
		<property name="minIdle" value="${cpool.minPoolSize}"/>
		<property name="maxActive" value="${cpool.maxPoolSize}"/>
      	<property name="timeBetweenEvictionRunsMillis" value="60000" />
      	<property name="minEvictableIdleTimeMillis" value="300000" />
      	<property name="testWhileIdle" value="true" />
      	<property name="testOnBorrow" value="false" />
     	<property name="testOnReturn" value="false" />
		<property name="poolPreparedStatements" value="true" />  
    	<property name="maxPoolPreparedStatementPerConnectionSize" value="20" />
      	<property name="filters" value="stat" /> 
    	<property name="connectionProperties" value="druid.stat.slowSqlMillis=5000" />
	</bean>
	
	
</beans>