mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-23 23:19:19 +08:00
190 lines
5.1 KiB
YAML
190 lines
5.1 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
|
|
|
|
# 拼多多开放平台 OAuth
|
|
pdd:
|
|
oauth:
|
|
client-id: 9b71d887c8dc4b46998dedfdeca9b866
|
|
client-secret: c626f640a6fd5f56b2c8c009a5eb2d5683e6b955
|
|
redirect-uri: https://ecbi.newloop.top/api-dev/ec/pdd/auth/callback
|
|
authorize-url: https://fuwu.pinduoduo.com/service-market/auth
|
|
state-ttl-seconds: 600
|
|
# POP 出站公共配置(限流、默认分页);业务同步配置见 order-sync
|
|
pop:
|
|
default-page-size: 100
|
|
rate-limit:
|
|
enabled: true
|
|
acquire-wait-ms: 5000
|
|
# 平台频控被动退避:2s → 5s → 15s
|
|
backoff-ms: [2000, 5000, 15000]
|
|
# 保守默认(约官方上限 60% 店铺余量 + 本 ISV 短窗);可按接口覆盖
|
|
default-rule:
|
|
shop-limit: 6000
|
|
shop-window-seconds: 60
|
|
app-burst-limit: 800
|
|
app-burst-window-seconds: 10
|
|
apis:
|
|
pdd.order.list.get:
|
|
shop-limit: 6000
|
|
shop-window-seconds: 60
|
|
app-burst-limit: 800
|
|
app-burst-window-seconds: 10
|
|
pdd.order.number.list.increment.get:
|
|
shop-limit: 6000
|
|
shop-window-seconds: 60
|
|
app-burst-limit: 800
|
|
app-burst-window-seconds: 10
|
|
pdd.order.information.get:
|
|
shop-limit: 6000
|
|
shop-window-seconds: 60
|
|
app-burst-limit: 800
|
|
app-burst-window-seconds: 10
|
|
pdd.mall.info.get:
|
|
shop-limit: 6000
|
|
shop-window-seconds: 60
|
|
app-burst-limit: 800
|
|
app-burst-window-seconds: 10
|
|
order-sync:
|
|
overlap-seconds: 120
|
|
lock-ttl-seconds: 600
|
|
incremental-job-enabled: true
|
|
incremental-cron: "0 */5 * * * ?"
|
|
|
|
# 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
|