application.yml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. spring:
  2. application:
  3. name: haha-admin
  4. # 数据库配置
  5. datasource:
  6. url: jdbc:mysql://server.kuaiyuman.cn:3306/haha?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&useServerPrepStmts=true&cachePrepStmts=true&prepStmtCacheSize=250&prepStmtCacheSqlLimit=2048
  7. username: root
  8. password: KuaiyuMan/*-
  9. driver-class-name: com.mysql.cj.jdbc.Driver
  10. # HikariCP 连接池配置
  11. hikari:
  12. # 最小空闲连接数
  13. minimum-idle: 3
  14. # 最大连接池大小
  15. maximum-pool-size: 10
  16. # 连接最大存活时间(毫秒),建议小于数据库的 wait_timeout
  17. max-lifetime: 1800000
  18. # 空闲连接超时时间
  19. idle-timeout: 300000
  20. # 连接超时时间
  21. connection-timeout: 30000
  22. # 连接测试查询
  23. connection-test-query: SELECT 1
  24. # 保持连接活跃的频率(毫秒)
  25. keepalive-time: 30000
  26. # Redis 配置
  27. data:
  28. redis:
  29. host: server.kuaiyuman.cn
  30. port: 6379
  31. password: KtXA^Zx!TZmLEy(@JjB@2(TVG0kdy5)&
  32. database: 9
  33. timeout: 30000
  34. # 连接配置
  35. lettuce:
  36. pool:
  37. max-active: 20
  38. max-wait: 5000
  39. max-idle: 10
  40. min-idle: 5
  41. # 连接耗尽时等待时间(毫秒)
  42. time-between-eviction-runs: 60000
  43. # 关闭超时时间
  44. shutdown-timeout: 200
  45. # 刷新配置
  46. refresh:
  47. # 刷新周期(毫秒)
  48. period: 30000
  49. # 最小刷新间隔
  50. min: 5000
  51. # MyBatis-Plus 配置
  52. mybatis-plus:
  53. mapper-locations: classpath*:mapper/**/*.xml
  54. configuration:
  55. map-underscore-to-camel-case: true
  56. global-config:
  57. db-config:
  58. id-type: ASSIGN_ID
  59. enable-sql-runner: false
  60. # 服务器配置
  61. server:
  62. port: 7070
  63. servlet:
  64. context-path: /admin
  65. # Sa-Token 配置
  66. sa-token:
  67. # token 名称(同时也是 cookie 名称)
  68. token-name: adminAccessToken
  69. # token 有效期(单位:秒) - 8小时
  70. timeout: 28800
  71. # token 临时有效期(单位:秒)
  72. active-timeout: -1
  73. # 是否允许同一账号多地同时登录
  74. is-concurrent: true
  75. # 同一账号最大登录数量
  76. max-login-count: 1
  77. # token 风格
  78. token-style: uuid
  79. # 是否输出操作日志
  80. is-log: true
  81. # 微信小程序配置
  82. wechat:
  83. # 支付配置 - 供支付分定时同步任务使用
  84. pay:
  85. app-id: wxb1cbe4678e0175f2 # 小程序appid
  86. mch-id: 1108941936 # 商户号
  87. v3-api-key: 7P5nbvnQpfj6cXpWrywtYstvJk5frjdK
  88. api-v2-key: vuN6wxsSmBKyeddhRzyJA25Ge8Mv5SQf # APIv2密钥(32位),用于 openBusinessView 签名 TODO: 请填写商户平台-API安全中的APIv2密钥(32位),用于 openBusinessView 签名
  89. notify-url: https://dev-haha.kuaiyuman.cn/api/payment/callback/wechat
  90. private-key-path: classpath:cert/apiclient_key.pem
  91. merchant-serial-number: 58F965A745DF42AA4C8603EE6B2B663E1B100553
  92. service-id: 00004000000000178152595581906374
  93. pay-score-notify-url: https://dev-haha.kuaiyuman.cn/api/payment/callback/wechat_payscore
  94. wechat-pay-public-key-id: PUB_KEY_ID_0111089419362026062400382393001400
  95. wechat-pay-public-key-path: classpath:cert/pub_key.pem
  96. # 管理端小程序(haha-admin-mp)配置 - 用于补货员微信登录等
  97. admin-miniapp:
  98. app-id: 2601051549145878 # todo 要替换
  99. secret: 06e1be59332b00de0baad82002cdbcb5 # todo 要替换
  100. # 哈哈零售 API 配置
  101. haha:
  102. api:
  103. app-id: 2601051549145878
  104. app-secret: 06e1be59332b00de0baad82002cdbcb5
  105. base-url: http://api.hahabianli.com/
  106. # 日志配置
  107. log:
  108. # 慢请求阈值(毫秒)
  109. slow-request-threshold: 3000
  110. # 是否启用敏感信息脱敏
  111. enable-sensitive-mask: true
  112. # 是否启用请求日志
  113. enable-request-log: true
  114. # 企得宝 ERP SDK 配置
  115. qdb:
  116. client-id: fs2009263
  117. client-secret: zfmR7PEBUA3lpRVQjTn0KxlUmVnWo2OP
  118. api-url: https://api.7debao.com/router/api
  119. # 设备离线预警配置
  120. device:
  121. alert:
  122. enabled: true
  123. cooldown-minutes: 30
  124. scan-interval-minutes: 5
  125. weak-signal-threshold: 2
  126. wechat-work:
  127. webhook-url: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY_HERE
  128. # 日志配置
  129. logging:
  130. level:
  131. root: info
  132. com.haha.admin: debug
  133. file:
  134. # 日志文件路径(相对于项目启动目录) - 按应用隔离子目录,避免 admin/miniapp 互相覆盖
  135. path: ./logs/admin
  136. name: ./logs/admin/haha-admin.log