yam文件Druid配置

datasource:
  name: druidDataSource
  type: com.alibaba.druid.pool.DruidDataSource
  druid:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://localhost:3306/数据库名字?useUnicode=true&zeroDateTimeBehavior=convertToNull&autoReconnect=true&characterEncoding=utf-8
    username: 用户名字
    password: 密码
    filters: stat,wall,log4j,config
    max-active: 100
    initial-size: 1
    max-wait: 60000
    min-idle: 1
    time-between-eviction-runs-millis: 60000
    min-evictable-idle-time-millis: 300000
    validation-query: select 'x'
    test-while-idle: true
    test-on-borrow: false
    test-on-return: false
    pool-prepared-statements: true
    max-open-prepared-statements: 50
    max-pool-prepared-statement-per-connection-size: 20

你可能感兴趣的:(mysql)