application.yml 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. server:
  2. port: 9083
  3. tomcat:
  4. headers:
  5. X-Content-Type-Options: nosniff
  6. X-Frame-Options: DENY
  7. X-XSS-Protection: 1; mode=block
  8. Strict-Transport-Security: max-age=31536000; includeSubDomains
  9. spring:
  10. servlet:
  11. multipart:
  12. max-file-size: 50MB
  13. max-request-size: 50MB
  14. application:
  15. name: train-backend
  16. datasource:
  17. # 训练营数据统一合并进 cfc 同库(zxyj):运营表 train_* 与 cfc 会员/活动/账本同库共存
  18. driver-class-name: com.mysql.cj.jdbc.Driver
  19. url: ${TRAIN_DB_URL:jdbc:mysql://192.168.16.251:3306/zxyj?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&createDatabaseIfNotExist=true}
  20. username: ${TRAIN_DB_USERNAME:zxyj}
  21. password: ${TRAIN_DB_PASSWORD:zxyj@123}
  22. hikari:
  23. maximum-pool-size: 50
  24. minimum-idle: 10
  25. connection-timeout: 30000
  26. idle-timeout: 600000
  27. max-lifetime: 1800000
  28. pool-name: TrainHikariPool
  29. mybatis-plus:
  30. mapper-locations: classpath*:/mapper/**/*.xml
  31. type-aliases-package: com.train.entity
  32. configuration:
  33. map-underscore-to-camel-case: true
  34. log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
  35. global-config:
  36. db-config:
  37. id-type: auto
  38. jwt:
  39. # 与 cfc(E:\cfc)对齐同一密钥,使 camp 学员 token 可与 cfc 体系互通
  40. secret: ${JWT_SECRET:cfc-prod-jwt-secret-2026-keep-it-safe!}
  41. expiration: 86400000
  42. wechat:
  43. appid: wx5ba8038ef16fb245
  44. secret: ${WECHAT_SECRET:dev-only-wechat-secret}
  45. login-url: https://api.weixin.qq.com/sns/jscode2session
  46. test-mode: true # 测试模式:跳过微信 API 调用,使用模拟 openid
  47. test-phone: "13800138000" # 测试模式下 getPhoneNumber 的模拟手机号
  48. subscribe-url: https://api.weixin.qq.com/cgi-bin/message/subscribe/send
  49. qrcode-url: https://api.weixin.qq.com/wxa/getwxacodeunlimit
  50. # 订阅消息模板 ID(生产填写:微信公众平台「订阅消息」申请后回填)
  51. # key 与定时任务 action 对应:followup_t1..30 / preclass_t7..t1
  52. message-template:
  53. followup-t1: ""
  54. followup-t3: ""
  55. followup-t7: ""
  56. followup-t21: ""
  57. followup-t30: ""
  58. preclass-t7: ""
  59. preclass-t3: ""
  60. preclass-t1: ""
  61. upload:
  62. base-dir: ./uploads
  63. allowed-types: image/jpeg,image/png,image/gif,image/webp,application/pdf
  64. logging:
  65. level:
  66. com.train: debug
  67. # 应用配置
  68. app:
  69. init-test-data: true # 是否初始化测试/种子数据
  70. # Admin 登录配置
  71. admin:
  72. username: admin
  73. password: admin123