spring: datasource: druid: url: jdbc:mysql://localhost:3306/CrmProject?serverTimezone=UTC&SSL=false&characterEncoding=UTF-8 username: root password: 123456 driver-class-name: com.mysql.jdbc.Driver # 數據源其他配置 initialSize: 5 minIdle: 5 maxActive: 20 maxWait: 60000 timeBetweenEvictionRunsMillis: 60000 minEvictableIdleTimeMillis: 300000 validation-query: SELECT 1 FROM DUAL testWhileIdle: true testOnBorrow: false testOnReturn: false poolPreparedStatements: true # 配置監控統計攔截的filters 去掉后監控界面sql無法統計,‘wall’用於防火牆 filters: stat,wall,log4j maxPoolPreparedStatementPerConnectionSize: 20 useGlobalDataSourceStat: true connectionProperties: druid.stat.mergeSql=true;druid.stat.slowSqlMills=500 stat-view-servlet: allow: login-password: 123456 login-username: 9977 url-pattern: /druid/* enabled: true