# 公共配置;环境差异见 application-{profile}.yml # 激活方式:--spring.profiles.active=dev|test|staging|prod spring: profiles: active: dev jackson: time-zone: Asia/Shanghai mvc: # SSE 长连接:避免默认异步超时把 emitter 掐断(只收到 connected 后反复重连) async: request-timeout: -1 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 # Spring AI MCP Server(Agent 能力面;鉴权见 ecom.agent.mcp) ai: mcp: server: name: ai-crm-mcp version: 1.0.0 protocol: STREAMABLE type: SYNC # 默认 SSE 已弃用;端点与文档约定一致 streamable-http: mcp-endpoint: /mcp # License、系统初始化、Agent(合并为单一 ecom 根键,避免 DuplicateKeyException) ecom: license: license-file: config/license.key revocation-file: config/revoked.jti revalidate-interval: 10 init: auto-init: true company-name: 系统公司 admin-username: admin admin-real-name: 超级管理员 admin-phone: 13800000001 admin-password: admin123 # Agent → MCP / 内部接口凭证(与浏览器 JWT、开放 API Key 分离) agent: mcp: # 为空则拒绝所有 MCP / 内部 Agent 请求;生产务必用环境变量覆盖 bearer-token: ${AGENT_MCP_TOKEN:} # 仅本地单租户 fallback;多租户以请求头 X-Agent-Company-Id 为准 company-id: ${AGENT_MCP_COMPANY_ID:} llm: # API Key 加解密材料;空则派生自 jwt.secret secret: ${AGENT_LLM_SECRET:} runtime-cache-ttl-seconds: 600 # 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 # OSS 客户端(凭证与开关;是否用于存文件由 sys.file.storage-type 决定) oss: endpoint: https://oss-cn-guangzhou.aliyuncs.com bucket-name: xyquan enabled: false # 系统文件:路径 = {app-name}/{profile}/{category}/{yyyy}/{hash}{ext};本地再加 uploads/ sys: file: app-name: ai-crm storage-type: local upload-mode: multipart max-size-mb: 50