海外活动管理项目后端项目
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.

68 lines
2.2 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. server:
  2. port: 12699 # 服务端口
  3. forward-headers-strategy: native # 全局生效
  4. spring:
  5. # ========== 数据源配置 (MySQL) ==========
  6. datasource:
  7. url: jdbc:mysql://39.101.133.168:3306/link?useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&serverTimezone=Asia/Shanghai
  8. username: link
  9. password: tEhdERkaGprEA7nT
  10. driver-class-name: com.mysql.cj.jdbc.Driver
  11. # hikari:
  12. # pool-name: LotteryHikariCP
  13. # maximum-pool-size: 10 # 连接池大小
  14. # connection-timeout: 30000
  15. hikari:
  16. maximum-pool-size: 20 # 默认一般是 10,根据并发量调整
  17. connection-timeout: 30000 # 连接超时时间(毫秒),默认 30s
  18. idle-timeout: 600000 # 空闲连接超时时间(默认 10 分钟)
  19. max-lifetime: 1800000 # 连接最大生命周期(默认 30 分钟)
  20. leak-detection-threshold: 5000 # 连接泄漏检测(毫秒,建议 5s)
  21. #
  22. # ========== Redis 配置 ==========
  23. redis:
  24. host: 39.98.127.73
  25. port: 7001
  26. password: 2TOVfFeJ0pyi9Wtj
  27. database: 0 # 默认DB索引
  28. jedis:
  29. pool:
  30. max-active: 8 # 最大连接数
  31. max-wait: 5000ms # 最大等待时间
  32. max-idle: 4 # 最大空闲连接
  33. min-idle: 1 # 最小空闲连接
  34. timeout: 3000ms # 连接超时时间
  35. # ========== MyBatis 配置(如果使用MyBatis代替JPA) ==========
  36. mybatis:
  37. mapper-locations: classpath:mapper/*.xml # XML映射文件路径
  38. type-aliases-package: com.lottery.entity # 实体类包路径
  39. configuration:
  40. map-underscore-to-camel-case: true # 开启驼峰命名转换
  41. log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 打印SQL日志
  42. logging:
  43. config: classpath:logback-spring.xml
  44. level:
  45. root: INFO
  46. org.springframework: WARN
  47. com.link: INFO
  48. # ========== 自定义配置(示例) ==========
  49. lottery:
  50. jwt:
  51. #用户端JWT
  52. user-secret-key: willier_need_at_least_32_chars_secure_key_12345
  53. user-ttl: 7200000
  54. user-token-name: authentication
  55. max-draw-times: 3 # 用户每日最大抽奖次数
  56. spring:
  57. jackson:
  58. date-format: yyyy-MM-dd HH:mm:ss
  59. time-zone: GMT+8