mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-23 23:59:19 +08:00
159 lines
4.2 KiB
YAML
159 lines
4.2 KiB
YAML
# 公共配置;环境差异见 application-{profile}.yml
|
||
# 激活方式:--spring.profiles.active=dev|test|staging|prod
|
||
|
||
spring:
|
||
profiles:
|
||
active: dev
|
||
config:
|
||
import:
|
||
- optional:classpath:config/channel-pdd.yml
|
||
jackson:
|
||
time-zone: Asia/Shanghai
|
||
mvc:
|
||
# SSE 长连接:避免默认异步超时把 emitter 掐断(只收到 connected 后反复重连)
|
||
async:
|
||
request-timeout: -1
|
||
# 配置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
|
||
mongodb:
|
||
# host/uri 见各环境;这里只放公共行为
|
||
auto-index-creation: false
|
||
rabbitmq:
|
||
# host/账号见各环境
|
||
port: 5672
|
||
virtual-host: /
|
||
publisher-confirm-type: correlated
|
||
publisher-returns: true
|
||
template:
|
||
mandatory: true
|
||
listener:
|
||
simple:
|
||
acknowledge-mode: auto
|
||
# 与全量/增量 listener concurrency 同量级,避免长任务预取过多
|
||
prefetch: 4
|
||
default-requeue-rejected: false
|
||
|
||
# 订单统计读模型(汇总表已删,待重构前关闭写入与 miss 补算)
|
||
# BI 日汇聚、License、系统初始化(合并为单一 ecom 根键,避免 DuplicateKeyException)
|
||
ecom:
|
||
bi:
|
||
stat:
|
||
lock-ttl-seconds: 600
|
||
inc-delay-ms: 5000
|
||
inc-max-retry: 20
|
||
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
|
||
|
||
# 导入任务 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
|
||
|
||
# 拼多多渠道配置见 config/channel-pdd.yml
|