application-dev.yml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288
  1. --- # 分库分表配置
  2. vber:
  3. shardingSphere:
  4. enabled: true
  5. database-name: vber_logic_db
  6. mode:
  7. type: Standalone
  8. repository:
  9. type: JDBC
  10. dataSources:
  11. # 主库数据源
  12. master:
  13. dataSourceClassName: com.zaxxer.hikari.HikariDataSource
  14. driverClassName: com.mysql.jdbc.Driver
  15. url: jdbc:mysql://47.112.30.247:4501/YanZhongXYH?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  16. username: root
  17. password: 123456
  18. # order1:
  19. # dataSourceClassName: com.zaxxer.hikari.HikariDataSource
  20. # driverClassName: com.mysql.cj.jdbc.Driver
  21. # url: jdbc:mysql://47.112.30.247:4501/ry-order1?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  22. # username: root
  23. # password: 123456
  24. # order2:
  25. # dataSourceClassName: com.zaxxer.hikari.HikariDataSource
  26. # driverClassName: com.mysql.cj.jdbc.Driver
  27. # url: jdbc:mysql://47.112.30.247:4501/ry-order2?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  28. # username: root
  29. # password: 123456
  30. # test2023:
  31. # dataSourceClassName: com.zaxxer.hikari.HikariDataSource
  32. # driverClassName: com.mysql.cj.jdbc.Driver
  33. # url: jdbc:mysql://47.112.30.247:4501/test_2023?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  34. # username: root
  35. # password: 123456
  36. # test2024:
  37. # dataSourceClassName: com.zaxxer.hikari.HikariDataSource
  38. # driverClassName: com.mysql.cj.jdbc.Driver
  39. # url: jdbc:mysql://47.112.30.247:4501/test_2024?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
  40. # username: root
  41. # password: 123456
  42. # rules:
  43. # sharding:
  44. # tables:
  45. # sys_order:
  46. # logicTable: sys_order
  47. # actualDataNodes: order$->{1..2}.sys_order_$->{0..1}
  48. # keyGenerateStrategy:
  49. # column: order_id
  50. # keyGeneratorName: snow_flake
  51. # databaseStrategy:
  52. # standard:
  53. # sharding-column: user_id
  54. # sharding-algorithm-name: database_inline
  55. # tableStrategy:
  56. # standard:
  57. # sharding-column: order_id
  58. # sharding-algorithm-name: order_inline
  59. # t_user:
  60. # logicTable: t_user
  61. # actualDataNodes: test${2023..2024}.t_user_0${1..9},test${2023..2024}.t_user_${10..12}
  62. # databaseStrategy:
  63. # standard:
  64. # sharding-column: birthday
  65. # sharding-algorithm-name: database_long_date
  66. # tableStrategy:
  67. # standard:
  68. # sharding-column: birthday
  69. # sharding-algorithm-name: table_long_date
  70. # key-generators:
  71. # snow_flake:
  72. # type: SNOWFLAKE
  73. # sharding-algorithms:
  74. # database_inline:
  75. # type: INLINE
  76. # props:
  77. # algorithm-expression: order$->{(user_id % 2) + 1}
  78. # order_inline:
  79. # type: INLINE
  80. # props:
  81. # algorithm-expression: sys_order_$->{order_id % 2}
  82. # database_long_date:
  83. # type: CLASS_BASED
  84. # props:
  85. # strategy: STANDARD
  86. # algorithmClassName: cn.xyh.framework.sharding.LongDateShardingAlgorithm
  87. # first-index: 0
  88. # second-index: 4
  89. # table_long_date:
  90. # type: CLASS_BASED
  91. # props:
  92. # strategy: STANDARD
  93. # algorithmClassName: cn.xyh.framework.sharding.LongDateShardingAlgorithm
  94. # first-index: 4
  95. # second-index: 6
  96. props:
  97. sql.show: true
  98. wx:
  99. app-id: wxf78f89c00da43b16
  100. app-secret: 02663dcc6c44fcba76dc04d7de7c8c4d
  101. sms:
  102. enabled: true
  103. #发送验证码短信的地址
  104. code-url: http://www.shvber.com:5081/AliyunMsg/Code
  105. #发送消息短信的地址
  106. msg-url: http://www.shvber.com:5081/AliyunMsg/Msg
  107. --- # 监控中心配置
  108. spring.boot.admin.client:
  109. # 增加客户端开关
  110. enabled: false
  111. url: http://localhost:6067/admin
  112. instance:
  113. service-host-type: IP
  114. username: vber
  115. password: 123iwb
  116. --- # xxl-job 配置
  117. xxl.job:
  118. # 执行器开关
  119. enabled: false
  120. # 调度中心地址:如调度中心集群部署存在多个地址则用逗号分隔。
  121. admin-addresses: http://localhost:6068
  122. # 执行器通讯TOKEN:非空时启用
  123. access-token: vber2023
  124. executor:
  125. # 执行器AppName:执行器心跳注册分组依据;为空则关闭自动注册
  126. appname: xxl-job-executor
  127. # 执行器端口号 执行器从6080开始往后写
  128. port: 6080
  129. # 执行器注册:默认IP:PORT
  130. address:
  131. # 执行器IP:默认自动获取IP
  132. ip:
  133. # 执行器运行日志文件存储磁盘路径
  134. logpath: ./logs/xxl-job
  135. # 执行器日志文件保存天数:大于3生效
  136. logretentiondays: 30
  137. --- # 数据源配置
  138. spring:
  139. datasource:
  140. type: com.zaxxer.hikari.HikariDataSource
  141. # 动态数据源文档 https://www.kancloud.cn/tracy5546/dynamic-datasource/content
  142. dynamic:
  143. # 性能分析插件(有性能损耗 不建议生产环境使用)
  144. p6spy: true
  145. # 设置默认的数据源或者数据源组,默认值即为 master
  146. primary: master
  147. # 严格模式 匹配不到数据源则报错
  148. strict: true
  149. datasource:
  150. # 主库数据源
  151. master:
  152. type: ${spring.datasource.type}
  153. driverClassName: com.mysql.cj.jdbc.Driver
  154. # jdbc 所有参数配置参考 https://lionli.blog.csdn.net/article/details/122018562
  155. # rewriteBatchedStatements=true 批处理优化 大幅提升批量插入更新删除性能(对数据库有性能损耗 使用批量操作应考虑性能问题)
  156. url: jdbc:mysql://47.112.30.247:4501/YanZhongXYH?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  157. username: root
  158. password: 123456
  159. # 从库数据源
  160. # slave:
  161. # lazy: true
  162. # type: ${spring.datasource.type}
  163. # driverClassName: com.mysql.cj.jdbc.Driver
  164. # url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8&autoReconnect=true&rewriteBatchedStatements=true
  165. # username:
  166. # password:
  167. hikari:
  168. # 最大连接池数量
  169. maxPoolSize: 20
  170. # 最小空闲线程数量
  171. minIdle: 10
  172. # 配置获取连接等待超时的时间
  173. connectionTimeout: 30000
  174. # 校验超时时间
  175. validationTimeout: 5000
  176. # 空闲连接存活最大时间,默认10分钟
  177. idleTimeout: 600000
  178. # 此属性控制池中连接的最长生命周期,值0表示无限生命周期,默认30分钟
  179. maxLifetime: 1800000
  180. # 连接测试query(配置检测连接是否有效)
  181. connectionTestQuery: SELECT 1
  182. # 多久检查一次连接的活性
  183. keepaliveTime: 30000
  184. --- # redis 单机配置(单机与集群只能开启一个另一个需要注释掉)
  185. spring:
  186. redis:
  187. # 地址
  188. #host: 192.168.0.82
  189. host: shvber.com
  190. # 端口,默认为6379
  191. #port: 6379
  192. port: 4502
  193. # 数据库索引
  194. database: 10
  195. # 密码(如没有密码请注释掉)
  196. password: Iwb-2023
  197. # 连接超时时间
  198. timeout: 10s
  199. lettuce:
  200. pool:
  201. # 连接池中的最小空闲连接
  202. min-idle: 0
  203. # 连接池中的最大空闲连接
  204. max-idle: 8
  205. # 连接池的最大数据库连接数
  206. max-active: 8
  207. # #连接池最大阻塞等待时间(使用负值表示没有限制)
  208. max-wait: -1ms
  209. # 是否开启ssl
  210. ssl: false
  211. redisson:
  212. # redis key前缀
  213. keyPrefix: YzXYH
  214. # 线程池数量
  215. threads: 4
  216. # Netty线程池数量
  217. nettyThreads: 8
  218. # 单节点配置
  219. singleServerConfig:
  220. # 客户端名称
  221. clientName: ${vber.name}
  222. # 最小空闲连接数
  223. connectionMinimumIdleSize: 8
  224. # 连接池大小
  225. connectionPoolSize: 32
  226. # 连接空闲超时,单位:毫秒
  227. idleConnectionTimeout: 10000
  228. # 命令等待超时,单位:毫秒
  229. timeout: 3000
  230. # 发布和订阅连接池大小
  231. subscriptionConnectionPoolSize: 50
  232. --- # mail 邮件发送
  233. mail:
  234. enabled: false
  235. host: smtp.163.com
  236. port: 465
  237. # 是否需要用户名密码验证
  238. auth: true
  239. # 发送方,遵循RFC-822标准
  240. from: xxx@163.com
  241. # 用户名(注意:如果使用foxmail邮箱,此处user为qq号)
  242. user: xxx@163.com
  243. # 密码(注意,某些邮箱需要为SMTP服务单独设置密码,详情查看相关帮助)
  244. pass: xxxxxxxxxx
  245. # 使用 STARTTLS安全连接,STARTTLS是对纯文本通信协议的扩展。
  246. starttlsEnable: true
  247. # 使用SSL安全连接
  248. sslEnable: true
  249. # SMTP超时时长,单位毫秒,缺省值不超时
  250. timeout: 0
  251. # Socket连接超时值,单位毫秒,缺省值不超时
  252. connectionTimeout: 0
  253. --- # sms 短信 支持 阿里云 腾讯云 云片 等等各式各样的短信服务商
  254. # https://wind.kim/doc/start 文档地址 各个厂商可同时使用
  255. sms:
  256. # 阿里云 dysmsapi.aliyuncs.com
  257. alibaba:
  258. #请求地址 默认为 dysmsapi.aliyuncs.com 如无特殊改变可以不用设置
  259. requestUrl: dysmsapi.aliyuncs.com
  260. #阿里云的accessKey
  261. accessKeyId: xxxxxxx
  262. #阿里云的accessKeySecret
  263. accessKeySecret: xxxxxxx
  264. #短信签名
  265. signature: 测试
  266. tencent:
  267. #请求地址默认为 sms.tencentcloudapi.com 如无特殊改变可不用设置
  268. requestUrl: sms.tencentcloudapi.com
  269. #腾讯云的accessKey
  270. accessKeyId: xxxxxxx
  271. #腾讯云的accessKeySecret
  272. accessKeySecret: xxxxxxx
  273. #短信签名
  274. signature: 测试
  275. #短信sdkAppId
  276. sdkAppId: appid
  277. #地域信息默认为 ap-guangzhou 如无特殊改变可不用设置
  278. territory: ap-guangzhou