mirror of
https://gitee.com/qqtt-ah/ai-crm.git
synced 2026-11-23 23:09:20 +08:00
95 lines
2.7 KiB
YAML
95 lines
2.7 KiB
YAML
# 公共配置;环境差异见 application-{profile}.yml
|
||
# 激活方式:--spring.profiles.active=dev|test|staging|prod
|
||
|
||
spring:
|
||
profiles:
|
||
active: dev
|
||
# 空库启动时先跑 classpath:db/migration;业务种子仍由 SysInitRunner 灌入
|
||
flyway:
|
||
enabled: true
|
||
locations: classpath:db/migration
|
||
encoding: UTF-8
|
||
# 基线含循环外键,单事务执行整份脚本
|
||
execute-in-transaction: true
|
||
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
|
||
# 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:}
|
||
|
||
# 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
|