application.yml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124
  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. # 连接配置
  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. refresh:
  37. period: 10000
  38. min: 5000
  39. # 数据库初始化
  40. sql:
  41. init:
  42. enabled: true
  43. mode: always
  44. schema-locations: classpath:sql/user.sql
  45. encoding: UTF-8
  46. # MyBatis-Plus 配置
  47. mybatis-plus:
  48. configuration:
  49. map-underscore-to-camel-case: true
  50. global-config:
  51. enable-sql-runner: false
  52. # PageHelper 分页插件配置
  53. pagehelper:
  54. # 指定数据库方言
  55. helper-dialect: mysql
  56. # 分页合理化参数,默认false。当设置为true时,pageNum<=0时会查询第一页,pageNum>pages(超过总数时),会查询最后一页
  57. reasonable: true
  58. # 支持通过Mapper接口参数来传递分页参数,默认false
  59. support-methods-arguments: true
  60. # 为了支持startPage(Object params)方法,增加了一个"params"参数来配置参数映射,用于从Map或ServletRequest中取值
  61. params: count=countSql
  62. # 总是返回PageInfo类型,默认false
  63. return-page-info: check
  64. # 服务器配置
  65. server:
  66. port: 7070
  67. servlet:
  68. context-path: /api
  69. # 微信相关配置
  70. wechat:
  71. # 支付配置
  72. pay:
  73. app-id: wxef6ffc2591d04b1b
  74. mch-id: 1888888888
  75. mch-key: 88888888888888888888888888888888
  76. v3-api-key: 88888888888888888888888888888888
  77. notify-url: http://localhost:7070/api/callback/wechat/pay
  78. # 小程序配置
  79. miniapp:
  80. app-id: your_wechat_miniapp_appid
  81. secret: your_wechat_miniapp_secret
  82. token: your_wechat_miniapp_token
  83. aes-key: your_wechat_miniapp_aes_key
  84. # 哈哈零兽配置
  85. haha:
  86. api:
  87. app-id: 2601051549145878
  88. app-secret: 06e1be59332b00de0baad82002cdbcb5
  89. base-url: http://api.hahabianli.com/
  90. # Sa-Token 配置
  91. sa-token:
  92. # token 名称(同时也是 cookie 名称)
  93. token-name: accessToken
  94. # token 有效期(单位:秒)- 7天
  95. timeout: 604800
  96. # token 临时有效期(单位:秒)
  97. active-timeout: -1
  98. # 是否允许同一账号多地同时登录
  99. is-concurrent: true
  100. # 同一账号最大登录数量
  101. max-login-count: 10
  102. # token 风格
  103. token-style: uuid
  104. # 是否输出操作日志
  105. is-log: true
  106. # 日志配置
  107. logging:
  108. level:
  109. root: info
  110. com.haha.miniapp: debug
  111. file:
  112. # 日志文件路径(相对于项目启动目录)
  113. path: ./logs
  114. name: ./logs/haha-miniapp.log