# 44测试服务器 server: port: 8090 address: 0.0.0.0 spring: datasource: type: com.alibaba.druid.pool.DruidDataSource druid: # 使用druid连接池 driver-class-name: com.mysql.cj.jdbc.Driver url: jdbc:mysql://49.232.26.44:3306/psychological_cpdm?useUnicode=true&characterEncoding=utf-8&allowMultiQueries=true&useSSL=false&serverTimezone=GMT%2B8 username: root #112/44 password: Mysql@.2020 # 初始化连接大小 initial-size: 5 # 最小空闲连接数 min-idle: 5 max-active: 20 max-wait: 30000 # 可关闭的空闲连接间隔时间 time-between-eviction-runs-millis: 60000 # 配置连接在池中的最小生存时间 min-evictable-idle-time-millis: 300000 validation-query: select '1' from dual test-while-idle: true test-on-borrow: false test-on-return: false # 打开PSCache,并且指定每个连接上PSCache的大小 pool-prepared-statements: true max-open-prepared-statements: 20 max-pool-prepared-statement-per-connection-size: 20 # 配置监控统计拦截的filters filters: stat,wall # 自己配置监控统计拦截的filter filter: # 开启druid datasource的状态监控 stat: enabled: true db-type: mysql # 开启慢sql监控,超过2s 就认为是慢sql,记录到日志中 log-slow-sql: true slow-sql-millis: 2000 ########## 配置StatViewServlet(监控页面),用于展示Druid的统计信息 ########## stat-view-servlet: url-pattern: /druid/* reset-enable: false login-username: testAdmin login-password: asdcjiafh^&912834 enabled: true allow: ########## 配置WebStatFilter,用于采集web关联监控的数据 ########## web-stat-filter: url-pattern: /* exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*" enabled: true session-stat-enable: true data: redis: repositories: enabled: false redis: host: 49.232.26.44 port: 6379 password: bjjmtech&jsyx timeout: 5000 jedis: pool: max-wait: -1 max-idle: 8 max-active: 8 min-idle: 0 #swagger 显示隐藏配置 swagger: show: true