application.yml 3.5 KB

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