application.yml 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. spring:
  2. application:
  3. name: haha-miniapp
  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. minimum-idle: 3
  13. maximum-pool-size: 10
  14. max-lifetime: 1800000
  15. idle-timeout: 300000
  16. connection-timeout: 30000
  17. connection-test-query: SELECT 1
  18. keepalive-time: 30000
  19. # Redis 配置
  20. data:
  21. redis:
  22. host: server.kuaiyuman.cn
  23. port: 6379
  24. password: "KtXA^Zx!TZmLEy(@JjB@2(TVG0kdy5)&"
  25. database: 8
  26. timeout: 10000
  27. lettuce:
  28. pool:
  29. max-active: 10
  30. max-wait: 3000
  31. max-idle: 8
  32. min-idle: 2
  33. time-between-eviction-runs: 30000
  34. shutdown-timeout: 100
  35. # 数据库初始化
  36. sql:
  37. init:
  38. enabled: true
  39. mode: always
  40. schema-locations: classpath:sql/user.sql
  41. encoding: UTF-8
  42. # MyBatis-Plus 配置
  43. mybatis-plus:
  44. configuration:
  45. map-underscore-to-camel-case: true
  46. log-impl: org.apache.ibatis.logging.slf4j.Slf4jImpl
  47. global-config:
  48. enable-sql-runner: false
  49. # PageHelper 分页插件配置
  50. pagehelper:
  51. # 指定数据库方言
  52. helper-dialect: mysql
  53. # 分页合理化参数,默认false。当设置为true时,pageNum<=0时会查询第一页,pageNum>pages(超过总数时),会查询最后一页
  54. reasonable: true
  55. # 支持通过Mapper接口参数来传递分页参数,默认false
  56. support-methods-arguments: true
  57. # 为了支持startPage(Object params)方法,增加了一个"params"参数来配置参数映射,用于从Map或ServletRequest中取值
  58. params: count=countSql
  59. # 总是返回PageInfo类型,默认false
  60. return-page-info: check
  61. # 服务器配置
  62. server:
  63. port: 7077
  64. servlet:
  65. context-path: /api
  66. # 微信相关配置
  67. wechat:
  68. # 支付配置 - 暂时屏蔽,等微信商户注册好后再配置
  69. # pay:
  70. # app-id: wxef6ffc2591d04b1b
  71. # mch-id: 1888888888
  72. # mch-key: 88888888888888888888888888888888
  73. # v3-api-key: 88888888888888888888888888888888
  74. # notify-url: http://localhost:7077/api/payment/callback/wechat
  75. # private-key-path: classpath:cert/apiclient_key.pem
  76. # merchant-serial-number: YOUR_MERCHANT_SERIAL_NUMBER
  77. # service-id: YOUR_PAY_SCORE_SERVICE_ID
  78. # pay-score-notify-url: http://localhost:7077/api/payment/callback/wechat_payscore
  79. # 小程序配置
  80. miniapp:
  81. app-id: your_wechat_miniapp_appid
  82. secret: your_wechat_miniapp_secret
  83. token: your_wechat_miniapp_token
  84. aes-key: your_wechat_miniapp_aes_key
  85. # 哈哈零兽配置
  86. haha:
  87. api:
  88. app-id: 2601051549145878
  89. app-secret: 06e1be59332b00de0baad82002cdbcb5
  90. base-url: http://api.hahabianli.com/
  91. # Sa-Token 配置
  92. sa-token:
  93. # token 名称(同时也是 cookie 名称)
  94. token-name: accessToken
  95. # token 有效期(单位:秒)- 7天
  96. timeout: 604800
  97. # token 临时有效期(单位:秒)
  98. active-timeout: -1
  99. # 是否允许同一账号多地同时登录
  100. is-concurrent: true
  101. # 同一账号最大登录数量
  102. max-login-count: 10
  103. # token 风格
  104. token-style: uuid
  105. # 是否输出操作日志
  106. is-log: true
  107. # 是否在登录后的 WebSocket 连接中输出 token
  108. is-read-cookie: false
  109. # 是否在登录后的请求体里返回 token
  110. is-read-body: false
  111. # 是否从 header 中读取 token
  112. is-read-header: true
  113. # 日志配置
  114. logging:
  115. level:
  116. root: info
  117. com.haha.miniapp: debug
  118. file:
  119. # 日志文件路径(相对于项目启动目录)
  120. path: ./logs
  121. name: ./logs/haha-miniapp.log