# ============================================================ # Spring AI Alibaba 全功能平台 — 应用配置 # 环境:本地内网 WSL2 # 放置:src/main/resources/application.yml # ============================================================ # --- 服务器 --- server: port: 8081 address: 0.0.0.0 # 绑定所有网卡,允许内网访问 # --- 应用名 --- spring: application: name: agent-platform # ========================================== # 数据源 — PostgreSQL 16 + pgvector # ========================================== datasource: url: jdbc:postgresql://localhost:5432/spring_ai_agent username: sa_agent password: agent_2026 driver-class-name: org.postgresql.Driver hikari: maximum-pool-size: 10 minimum-idle: 2 # ========================================== # AI 模型 — 阿里云百炼 DashScope(外网) # ========================================== ai: dashscope: api-key: ${DASHSCOPE_API_KEY} chat: options: model: qwen-plus temperature: 0.7 # max-tokens not supported in 1.0.0.2 DashScopeChatOptions, removed # ========================================== # Nacos — 服务注册发现 + 动态配置中心 # ========================================== alibaba: # Agent Nacos 代理(1.1.2.2 新配置,注意用 camelCase) agent: proxy: nacos: enabled: true serverAddr: localhost:8848 namespace: sa-agent-config nacos: # 动态配置 config: server-addr: localhost:8848 namespace: sa-agent-config username: nacos password: nacos group: DEFAULT_GROUP refresh-enabled: true # 配置热更新 # MCP 分布式 — 服务注册发现(暂无 nacos-mcp starter,关闭) mcp: nacos: enabled: false username: nacos password: nacos registry: enabled: true service-namespace: sa-agent-mcp # ========================================== # 对象存储 — MinIO(S3 兼容) # ========================================== cloud: aws: s3: endpoint: http://localhost:9000 region: us-east-1 path-style-access-enabled: true credentials: access-key: minioadmin secret-key: minioadmin # ========================================== # Admin Studio — 可视化编排 + 评测平台 # ========================================== spring.ai.alibaba: studio: enabled: true path: /chatui # Graph 工作流可观测 graph: observation: enabled: true # ========================================== # Actuator — 健康检查 + 指标 # ========================================== management: endpoints: web: exposure: include: health,info,metrics,env,prometheus endpoint: health: show-details: when-authorized metrics: export: prometheus: enabled: true # ========================================== # 日志 # ========================================== logging: level: com.alibaba.cloud.ai: DEBUG com.demo.agent: DEBUG org.springframework.ai: INFO file: name: logs/agent-platform.log