测试平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

134 lines
4.5 KiB

1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
  1. --- # 临时文件存储位置 避免临时文件被系统清理报错
  2. spring.servlet.multipart.location: /app/testP/temp
  3. --- # 数据源配置
  4. spring:
  5. datasource:
  6. type: com.zaxxer.hikari.HikariDataSource
  7. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  8. dynamic:
  9. # 性能分析插件(有性能损耗 不建议生产环境使用)
  10. p6spy: false
  11. # 设置默认的数据源或者数据源组,默认值即为 master
  12. primary: master
  13. # 严格模式 匹配不到数据源则报错
  14. strict: true
  15. datasource:
  16. # 主库数据源
  17. master:
  18. type: ${spring.datasource.type}
  19. driverClassName: com.mysql.cj.jdbc.Driver
  20. # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  21. # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  22. url: jdbc:mysql://127.0.0.1:3306/test_platform?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  23. username: root
  24. password: 123456
  25. # 从库数据源
  26. postgresql:
  27. type: ${spring.datasource.type}
  28. driverClassName: org.postgresql.Driver
  29. url: jdbc:postgresql://localhost:5432/chng_wuzi_data
  30. username: dev
  31. password: 123456
  32. hikari:
  33. # 最大连接池数量
  34. maxPoolSize: 20
  35. # 最小空闲线程数量
  36. minIdle: 10
  37. # 配置获取连接等待超时的时间
  38. connectionTimeout: 30000
  39. # 校验超时时间
  40. validationTimeout: 5000
  41. # 空闲连接存活最大时间,默认10分钟
  42. idleTimeout: 600000
  43. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  44. maxLifetime: 1800000
  45. # 多久检查一次连接的活性
  46. keepaliveTime: 30000
  47. --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  48. spring:
  49. redis:
  50. # 地址
  51. host: 127.0.0.1
  52. # 端口,默认为6379
  53. port: 6379
  54. # 数据库索引
  55. database: 4
  56. # 密码(如没有密码请注释掉)
  57. password: 123456
  58. # 连接超时时间
  59. timeout: 10s
  60. # 是否开启ssl
  61. ssl: false
  62. redisson:
  63. # redis key前缀
  64. keyPrefix:
  65. # 线程池数量
  66. threads: 16
  67. # Netty线程池数量
  68. nettyThreads: 32
  69. # 单节点配置
  70. singleServerConfig:
  71. # 客户端名称
  72. clientName: ${testplatform.name}
  73. # 最小空闲连接数
  74. connectionMinimumIdleSize: 32
  75. # 连接池大小
  76. connectionPoolSize: 64
  77. # 连接空闲超时,单位:毫秒
  78. idleConnectionTimeout: 10000
  79. # 命令等待超时,单位:毫秒
  80. timeout: 3000
  81. # 发布和订阅连接池大小
  82. subscriptionConnectionPoolSize: 50
  83. --- # mail 邮件发送
  84. mail:
  85. enabled: false
  86. host: smtp.163.com
  87. port: 465
  88. # 是否需要用户名密码验证
  89. auth: true
  90. # 发送方,遵循RFC-822标准
  91. from: xxx@163.com
  92. # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  93. user: xxx@163.com
  94. # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  95. pass: xxxxxxxxxx
  96. # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  97. starttlsEnable: true
  98. # 使用SSL安全连接
  99. sslEnable: true
  100. # SMTP超时时长,单位毫秒,缺省值不超时
  101. timeout: 0
  102. # Socket连接超时值,单位毫秒,缺省值不超时
  103. connectionTimeout: 0
  104. --- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
  105. # https://wind.kim/doc/start 文档地址 各个厂商可同时使用
  106. sms:
  107. # 阿里云 dysmsapi.aliyuncs.com
  108. alibaba:
  109. #请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
  110. requestUrl: dysmsapi.aliyuncs.com
  111. #阿里云的accessKey
  112. accessKeyId: xxxxxxx
  113. #阿里云的accessKeySecret
  114. accessKeySecret: xxxxxxx
  115. #短信签名
  116. signature: 测试
  117. tencent:
  118. #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
  119. requestUrl: sms.tencentcloudapi.com
  120. #腾讯云的accessKey
  121. accessKeyId: xxxxxxx
  122. #腾讯云的accessKeySecret
  123. accessKeySecret: xxxxxxx
  124. #短信签名
  125. signature: 测试
  126. #短信sdkAppId
  127. sdkAppId: appid
  128. #地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
  129. territory: ap-guangzhou