Files
ecom-dmb/ecom-dmb-backend/src/main/resources/application.yml
T

141 lines
3.5 KiB
YAML

# 公共配置;环境差异见 application-{profile}.yml
# 激活方式:--spring.profiles.active=dev|test|staging|prod
spring:
profiles:
active: dev
jackson:
time-zone: Asia/Shanghai
# 配置404错误处理 - 注释掉,避免影响Swagger文档访问
# mvc:
# throw-exception-if-no-handler-found: true
web:
resources:
add-mappings: true
servlet:
multipart:
max-file-size: 50MB
max-request-size: 100MB
enabled: true
datasource:
hikari:
maximum-pool-size: 10
minimum-idle: 5
connection-timeout: 30000
idle-timeout: 600000
max-lifetime: 30000
data:
redis:
timeout: 10000ms # Lettuce 命令执行超时,需 >= leftPop 的 5 秒等待时间
lettuce:
pool:
max-active: 8
max-idle: 8
min-idle: 0
max-wait: -1ms
# 订单统计读模型
order-stat:
stat-source: daily
auto-refresh-on-miss: true
refresh-worker:
enabled: true
pool-size: 4
poll-interval-ms: 2000
cache:
enabled: true
ttl-history-seconds: 86400
ttl-today-seconds: 900
nightly-rebuild-cron: "0 30 2 * * ?"
# 导入任务 Redis Stream 队列(DB 为真相源,Redis 负责调度)
import-task:
queue:
enabled: true
stream-prefix: import:task:stream
consumer-group: import-task-group
block-timeout-ms: 5000
claim-idle-ms: 300000
reconcile-interval-ms: 60000
stuck-processing-ms: 300000
reconcile-lock-seconds: 55
worker:
pool-size-per-type: 1
type-enabled:
order: true
product: false
promotion_record: true
# JWT 令牌有效期(密钥见各环境配置)
jwt:
access-token-expiration: 900
refresh-token-expiration: 604800
# mybatis-plus 配置
mybatis-plus:
mapper-locations: classpath:mapper/**/*.xml
configuration:
map-underscore-to-camel-case: true
# OpenAPI / Knife4j
springdoc:
swagger-ui:
path: /swagger-ui.html
api-docs:
path: /v3/api-docs
packages-to-scan: top.xyquan.ecomdmbbackend.modules
group-configs:
- group: "系统模块"
paths-to-match:
- "/auth/**"
- "/menu/**"
- "/permission/**"
- "/user/**"
- "/sys/file/**"
packages-to-scan: "top.xyquan.ecomdmbbackend.modules.sys.controller"
- group: "组织模块"
paths-to-match:
- "/company/**"
- "/company-menu/**"
- "/department/**"
- "/position/**"
- "/position-menu/**"
- "/position-permission/**"
packages-to-scan: "top.xyquan.ecomdmbbackend.modules.org.controller"
- group: "订阅模块"
paths-to-match:
- "/plan/**"
- "/plan-pricing/**"
- "/subscription/**"
packages-to-scan: "top.xyquan.ecomdmbbackend.modules.sub.controller"
- group: "媒体模块"
paths-to-match:
- "/media/image/**"
- "/media/file/**"
packages-to-scan: "top.xyquan.ecomdmbbackend.modules.media.controller"
knife4j:
enable-group: true
enable-search: true
enable-footer: false
enable-footer-custom: false
# OSS(开关与凭证见各环境配置)
oss:
endpoint: https://oss-cn-guangzhou.aliyuncs.com
bucket-name: xyquan
# License 授权(开关与公钥见 LicenseEnforcement 源码硬编码)
ecom:
license:
license-file: config/license.key
revocation-file: config/revoked.jti
revalidate-interval: 10
init:
auto-init: true
company-name: 系统公司
admin-login-code: admin
admin-real-name: 超级管理员
admin-phone: 13800000001
admin-password: admin123