server: port: 8080 spring: datasource: url: ${DB_URL:jdbc:mysql://192.168.3.100:3306/ecom_dmb_dev?characterEncoding=utf-8&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true} username: ${DB_USERNAME:ecom_dmb_dev} password: ${DB_PASSWORD:ecom_dmb_dev} hikari: maximum-pool-size: 10 minimum-idle: 5 connection-timeout: 30000 idle-timeout: 600000 max-lifetime: 30000 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 # Redis配置 data: redis: host: ${REDIS_HOST:192.168.3.100} port: ${REDIS_PORT:6379} password: ${REDIS_PASSWORD:redis_qinghua} database: 2 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-enabled: false nightly-rebuild-cron: "0 30 2 * * ?" # JWT配置 # ⚠️ 生产环境必须通过环境变量 JWT_SECRET 覆盖,默认值仅用于本地开发 jwt: secret: ${JWT_SECRET:your-secret-key-here-must-be-at-least-64-bytes-long-for-hs512-algorithm-security} # 访问令牌有效期:15分钟(900秒) access-token-expiration: 900 # 刷新令牌有效期:7天(604800秒) refresh-token-expiration: 604800 # mybatis-plus配置 mybatis-plus: # mapper xml文件位置 mapper-locations: classpath:mapper/**/*.xml configuration: # 驼峰命名转换 map-underscore-to-camel-case: true # 打印SQL日志(已关闭) # log-impl: org.apache.ibatis.logging.stdout.StdOutImpl # 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的增强配置 knife4j: enable: true # 开启分组功能 enable-group: true # 开启搜索功能 enable-search: true # 开启footer功能 enable-footer: false # 开启footer自定义 enable-footer-custom: false # OSS配置 oss: enabled: false endpoint: ${OSS_ENDPOINT:https://oss-cn-guangzhou.aliyuncs.com} access-key-id: ${OSS_ACCESS_KEY_ID:LTAI5t8oyyor6wLrQasDUQA3} access-key-secret: ${OSS_ACCESS_KEY_SECRET:U0d3BeKADTJUteSsT5gBtxzlbHoJFi} bucket-name: ${OSS_BUCKET:xyquan} domain: ${OSS_DOMAIN:https://xyquan.oss-cn-guangzhou.aliyuncs.com} # 文件访问配置 file: access-domain: http://localhost:5666 # 本地文件访问域名 # License 授权配置(开关与公钥见 LicenseEnforcement 源码硬编码) ecom: license: license-key: ${ECOM_LICENSE_KEY:} license-file: ${ECOM_LICENSE_FILE:config/license.key} revocation-file: ${ECOM_LICENSE_REVOCATION_FILE:config/revoked.jti} revalidate-interval: ${ECOM_LICENSE_REVALIDATE_INTERVAL:10} online-revocation-check: ${ECOM_LICENSE_ONLINE_REVOKE:false} license-server-url: ${ECOM_LICENSE_SERVER_URL:} # 日志配置 logging: level: top.xyquan.ecomdmbbackend: INFO org.springframework.security: INFO org.springframework.web: INFO