application-prod.yml 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. spring:
  2. datasource:
  3. type: com.alibaba.druid.pool.DruidDataSource
  4. driverClassName: net.sf.log4jdbc.DriverSpy
  5. druid:
  6. first: #数据源1
  7. url: jdbc:log4jdbc:mysql://localhost:3306/warewms_message?allowMultiQueries=true&useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true
  8. username: root
  9. password: root
  10. initial-size: 10
  11. max-active: 50
  12. min-idle: 1
  13. max-wait: 60000
  14. pool-prepared-statements: true
  15. max-pool-prepared-statement-per-connection-size: 20
  16. time-between-eviction-runs-millis: 60000
  17. min-evictable-idle-time-millis: 300000
  18. validation-query: SELECT 1 FROM DUAL
  19. test-while-idle: true
  20. test-on-borrow: false
  21. test-on-return: false
  22. removeAbandonedTimeout: 1800
  23. removeAbandoned: false
  24. #removeAbandonedTimeoutMillis: 300000
  25. stat-view-servlet:
  26. enabled: true
  27. url-pattern: /druid/*
  28. #login-username: admin
  29. #login-password: admin
  30. filter:
  31. stat:
  32. log-slow-sql: true
  33. slow-sql-millis: 1000
  34. merge-sql: true
  35. wall:
  36. config:
  37. multi-statement-allow: true
  38. second: #数据源2
  39. driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
  40. url: jdbc:sqlserver://172.27.16.3:1433;DatabaseName=SOADB
  41. username: agv
  42. password: agv
  43. initial-size: 1
  44. max-active: 10
  45. min-idle: 10
  46. max-wait: 60000
  47. pool-prepared-statements: true
  48. max-pool-prepared-statement-per-connection-size: 20
  49. time-between-eviction-runs-millis: 60000
  50. min-evictable-idle-time-millis: 300000
  51. validation-query: SELECT getdate()
  52. test-while-idle: true
  53. test-on-borrow: false
  54. test-on-return: false
  55. removeAbandonedTimeout: 1800
  56. removeAbandoned: false
  57. #removeAbandonedTimeoutMillis: 300000
  58. stat-view-servlet:
  59. enabled: true
  60. url-pattern: /druid/*
  61. #login-username: admin
  62. #login-password: admin
  63. filter:
  64. stat:
  65. log-slow-sql: true
  66. slow-sql-millis: 1000
  67. merge-sql: true
  68. wall:
  69. config:
  70. multi-statement-allow: true
  71. logging:
  72. config: classpath:logback-spring.xml