标签:
<!-- 数据源配置 --> <bean id="default" class="com.alibaba.druid.pool.DruidDataSource" destroy-method="close"> <property name="url" value="${jdbc.url}" /> <property name="username" value="${jdbc.username}" /> <property name="password" value="${jdbc.password}" /> <property name="connectionProperties" value="config.decrypt=true"></property> <property name="driverClassName" value="${jdbc.driverClassName}" /> <property name="filters" value="${durid.filters}" /> <property name="maxActive" value="${durid.maxActive}" /> <property name="initialSize" value="${durid.initialSize}" /> <property name="maxWait" value="${durid.maxWait}" /> <property name="minIdle" value="${durid.minIdle}" /> <property name="timeBetweenEvictionRunsMillis" value="${durid.timeBetweenEvictionRunsMillis}" /> <property name="minEvictableIdleTimeMillis" value="${durid.minEvictableIdleTimeMillis}" /> <property name="validationQuery" value="${durid.validationQuery}" /> <property name="testWhileIdle" value="${durid.testWhileIdle}" /> <property name="testOnBorrow" value="${durid.testOnBorrow}" /> <property name="testOnReturn" value="${durid.testOnReturn}" /> <property name="maxOpenPreparedStatements" value="${durid.maxOpenPreparedStatements}" /> <property name="removeAbandoned" value="${durid.removeAbandoned}" /> <!-- 打开removeAbandoned功能 --> <property name="removeAbandonedTimeout" value="${durid.removeAbandonedTimeout}" /> <!-- 1800秒,也就是30分钟 --> <property name="logAbandoned" value="${durid.logAbandoned}" /> <!-- 关闭abanded连接时输出错误日志 --> </bean>
durid.filters=config
标签:
原文地址:http://www.cnblogs.com/wangjuneng/p/4629104.html