| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133 |
- spring:
- application:
- name: haha-admin
- # 数据库配置
- datasource:
- 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
- username: root
- password: KuaiyuMan/*-
- driver-class-name: com.mysql.cj.jdbc.Driver
- # HikariCP 连接池配置
- hikari:
- # 最小空闲连接数
- minimum-idle: 3
- # 最大连接池大小
- maximum-pool-size: 10
- # 连接最大存活时间(毫秒),建议小于数据库的 wait_timeout
- max-lifetime: 1800000
- # 空闲连接超时时间
- idle-timeout: 300000
- # 连接超时时间
- connection-timeout: 30000
- # 连接测试查询
- connection-test-query: SELECT 1
- # 保持连接活跃的频率(毫秒)
- keepalive-time: 30000
- # Redis 配置
- data:
- redis:
- host: server.kuaiyuman.cn
- port: 6379
- password: KtXA^Zx!TZmLEy(@JjB@2(TVG0kdy5)&
- database: 9
- timeout: 30000
- # 连接配置
- lettuce:
- pool:
- max-active: 20
- max-wait: 5000
- max-idle: 10
- min-idle: 5
- # 连接耗尽时等待时间(毫秒)
- time-between-eviction-runs: 60000
- # 关闭超时时间
- shutdown-timeout: 200
- # 刷新配置
- refresh:
- # 刷新周期(毫秒)
- period: 30000
- # 最小刷新间隔
- min: 5000
- # MyBatis-Plus 配置
- mybatis-plus:
- configuration:
- map-underscore-to-camel-case: true
- global-config:
- db-config:
- id-type: ASSIGN_ID
- enable-sql-runner: false
- # PageHelper 分页插件配置
- pagehelper:
- # 指定数据库方言
- helper-dialect: mysql
- # 分页合理化参数,默认false。当设置为true时,pageNum<=0时会查询第一页,pageNum>pages(超过总数时),会查询最后一页
- reasonable: true
- # 支持通过Mapper接口参数来传递分页参数,默认false
- support-methods-arguments: true
- # 为了支持startPage(Object params)方法,增加了一个"params"参数来配置参数映射,用于从Map或ServletRequest中取值
- params: count=countSql
- # 总是返回PageInfo类型,默认false
- return-page-info: check
- # 服务器配置
- server:
- port: 7070
- servlet:
- context-path: /admin
- # Sa-Token 配置
- sa-token:
- # token 名称(同时也是 cookie 名称)
- token-name: adminAccessToken
- # token 有效期(单位:秒) - 8小时
- timeout: 28800
- # token 临时有效期(单位:秒)
- active-timeout: -1
- # 是否允许同一账号多地同时登录
- is-concurrent: true
- # 同一账号最大登录数量
- max-login-count: 1
- # token 风格
- token-style: uuid
- # 是否输出操作日志
- is-log: true
- # 哈哈零售 API 配置
- haha:
- api:
- app-id: 2601051549145878
- app-secret: 06e1be59332b00de0baad82002cdbcb5
- base-url: http://api.hahabianli.com/
-
- # 日志配置
- log:
- # 慢请求阈值(毫秒)
- slow-request-threshold: 3000
- # 是否启用敏感信息脱敏
- enable-sensitive-mask: true
- # 是否启用请求日志
- enable-request-log: true
- # 设备离线预警配置
- device:
- alert:
- enabled: true
- cooldown-minutes: 30
- scan-interval-minutes: 5
- weak-signal-threshold: 2
- wechat-work:
- webhook-url: https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=YOUR_KEY_HERE
- # 日志配置
- logging:
- level:
- root: info
- com.haha.admin: debug
- file:
- # 日志文件路径(相对于项目启动目录)
- path: ./logs
- name: ./logs/haha-admin.log
|