application-debug.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. spring:
  2. datasource:
  3. druid:
  4. # 数据库 1
  5. db1:
  6. driver-class-name: com.mysql.cj.jdbc.Driver
  7. platform: mysql
  8. url: jdbc:mysql://192.168.2.237:3306/emrais?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
  9. username: root
  10. password: lantone
  11. # 连接池的配置信息
  12. # 初始化大小,最小,最大
  13. initialSize: 5
  14. minIdle: 5
  15. maxActive: 20
  16. # 配置获取连接等待超时的时间
  17. maxWait: 60000
  18. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  19. timeBetweenEvictionRunsMillis: 60000
  20. # 配置一个连接在池中最小生存的时间,单位是毫秒
  21. minEvictableIdleTimeMillis: 300000
  22. validationQuery: SELECT 1 FROM DUAL
  23. testWhileIdle: true
  24. testOnBorrow: false
  25. testOnReturn: false
  26. # 打开PSCache,并且指定每个连接上PSCache的大小
  27. poolPreparedStatements: true
  28. maxPoolPreparedStatementPerConnectionSize: 20
  29. # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
  30. filters.commons-log.connection-logger-name: wall,log4j
  31. filter:
  32. stat:
  33. enabled: true
  34. mergeSql: true
  35. log-slow-sql: true
  36. slow-sql-millis: 2000
  37. #监控配置
  38. web-stat-filter:
  39. enabled: true
  40. url-pattern: /*
  41. exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
  42. # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
  43. stat-view-servlet:
  44. enabled: true
  45. url-pattern: /druid/*
  46. reset-enable: false
  47. login-username: root
  48. login-password: root
  49. # 数据库 2
  50. db2:
  51. driver-class-name: com.mysql.cj.jdbc.Driver
  52. platform: mysql
  53. url: jdbc:mysql://192.168.2.237:3306/qc?serverTimezone=GMT%2B8&useUnicode=true&characterEncoding=utf8&characterSetResults=utf8&useSSL=false&allowMultiQueries=true
  54. username: root
  55. password: lantone
  56. # 连接池的配置信息
  57. # 初始化大小,最小,最大
  58. initialSize: 5
  59. minIdle: 5
  60. maxActive: 20
  61. # 配置获取连接等待超时的时间
  62. maxWait: 60000
  63. # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
  64. timeBetweenEvictionRunsMillis: 60000
  65. # 配置一个连接在池中最小生存的时间,单位是毫秒
  66. minEvictableIdleTimeMillis: 300000
  67. validationQuery: SELECT 1 FROM DUAL
  68. testWhileIdle: true
  69. testOnBorrow: false
  70. testOnReturn: false
  71. # 打开PSCache,并且指定每个连接上PSCache的大小
  72. poolPreparedStatements: true
  73. maxPoolPreparedStatementPerConnectionSize: 20
  74. # 配置监控统计拦截的filters,去掉后监控界面sql无法统计,'wall'用于防火墙
  75. filters.commons-log.connection-logger-name: wall,log4j
  76. filter:
  77. stat:
  78. enabled: true
  79. mergeSql: true
  80. log-slow-sql: true
  81. slow-sql-millis: 2000
  82. #监控配置
  83. web-stat-filter:
  84. enabled: true
  85. url-pattern: /*
  86. exclusions: '*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*'
  87. # StatViewServlet配置,说明请参考Druid Wiki,配置_StatViewServlet配置
  88. stat-view-servlet:
  89. enabled: true
  90. url-pattern: /druid/*
  91. reset-enable: false
  92. login-username: root
  93. login-password: root