# 驱动配置信息
spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
spring.datasource.url = jdbc:mysql:loadbalance://ip1:3307,ip2:3307,ip3:3307/test?roundRobinLoadBalance=true&failOverReadOnly=false&tcpRcvBuf=1024000&loadBalanceStrategy=bestResponseTime&loadBalanceBlacklistTimeout=300000&loadBalancePingTimeout=1000&selfDestructOnPingMaxOperations=200&queryTimeoutKillsConnection=true&loadBalanceValidateConnectionOnSwapServer=true&connectTimeout=1000
spring.datasource.username = root
spring.datasource.password = unew2&2014
spring.datasource.driverClassName = com.mysql.jdbc.Driver
# 连接池的配置信息
# 初始化大小,最小,最大
spring.datasource.initialSize=5
spring.datasource.minIdle=5
spring.datasource.maxActive=20
# 配置获取连接等待超时的时间
spring.datasource.maxWait=60000
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
spring.datasource.timeBetweenEvictionRunsMillis=60000
# 配置一个连接在池中最小生存的时间,单位是毫秒
spring.datasource.minEvictableIdleTimeMillis=300000
spring.datasource.validationQuery=SELECT 1 FROM DUAL
spring.datasource.testWhileIdle=true
spring.datasource.testOnBorrow=false
spring.datasource.testOnReturn=false
# 打开PSCache,并且指定每个连接上PSCache的大小
spring.datasource.poolPreparedStatements=true
spring.datasource.maxPoolPreparedStatementPerConnectionSize=20
# 配置监控统计拦截的filters,去掉后监控接口sql无法统计,'wall'用于防火墙
spring.datasource.filters=stat,wall,log4j
# 通过connectProperties属性来打开mergeSql功能;慢SQL记录
spring.datasource.connectionProperties=druid.stat.mergeSql=true;druid.stat.slowSqlMillis=5000