springboot用yml配置druid

spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    type: com.alibaba.druid.pool.DruidDataSource
    filters: stat
    maxActive: 20
    initialSize: 1
    maxWait: 60000
    minIdle:
    timeBetweenEvictionRunsMillis: 60000
    minEvictionRunsMillis: 300000
    validationQuery: select 'x'
    testWhileIdle: true
    testOnBorrow: false
    testOnReturn: false
    poolPreparedStatements: true
    maxOpenPreparedStatements: 20

 

posted @ 2018-11-15 23:43  正能量教官  阅读(1873)  评论(0编辑  收藏  举报