application-dev.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. spring:
  2. datasource:
  3. type: com.alibaba.druid.pool.DruidDataSource
  4. druid:
  5. driver-class-name: com.mysql.cj.jdbc.Driver
  6. url: jdbc:mysql://localhost:3306/renren_fast?useUnicode=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
  7. username: renren
  8. password: 123456
  9. initial-size: 10
  10. max-active: 100
  11. min-idle: 10
  12. max-wait: 60000
  13. pool-prepared-statements: true
  14. max-pool-prepared-statement-per-connection-size: 20
  15. time-between-eviction-runs-millis: 60000
  16. min-evictable-idle-time-millis: 300000
  17. #Oracle需要打开注释
  18. #validation-query: SELECT 1 FROM DUAL
  19. test-while-idle: true
  20. test-on-borrow: false
  21. test-on-return: false
  22. stat-view-servlet:
  23. enabled: true
  24. url-pattern: /druid/*
  25. #login-username: admin
  26. #login-password: admin
  27. filter:
  28. stat:
  29. log-slow-sql: true
  30. slow-sql-millis: 1000
  31. merge-sql: false
  32. wall:
  33. config:
  34. multi-statement-allow: true
  35. ##多数据源的配置
  36. #dynamic:
  37. # datasource:
  38. # slave1:
  39. # driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
  40. # url: jdbc:sqlserver://localhost:1433;DatabaseName=renren_security
  41. # username: sa
  42. # password: 123456
  43. # slave2:
  44. # driver-class-name: org.postgresql.Driver
  45. # url: jdbc:postgresql://localhost:5432/renren_security
  46. # username: renren
  47. # password: 123456
  48. redis:
  49. open: false # 是否开启redis缓存 true开启 false关闭
  50. database: 0
  51. host: localhost
  52. port: 6379
  53. password: # 密码(默认为空)
  54. timeout: 6000ms # 连接超时时长(毫秒)
  55. jedis:
  56. pool:
  57. max-active: 1000 # 连接池最大连接数(使用负值表示没有限制)
  58. max-wait: -1ms # 连接池最大阻塞等待时间(使用负值表示没有限制)
  59. max-idle: 10 # 连接池中的最大空闲连接
  60. min-idle: 5 # 连接池中的最小空闲连接