Spring AISpring AI
Spring AI 把 AI 能力做成 Spring 组件:可移植 Model API、ChatClient、向量库与 MCP 集成, 用 Spring Boot 的 starter 和 auto-configuration 装配。
跨大类对照:vLLM。
AI as Spring components: a portable Model API, ChatClient, vector stores and MCP integration, assembled with Spring Boot starters and auto-configuration.
适合与不适合When to use it, when not to
适合:Spring Boot 团队、要把 AI 做成标准 Bean、需要 MCP 与向量库集成。 不适合:非 Java 团队、要成品 agent、要轻量脚本调用。
Fits Spring Boot teams who want AI as standard Spring components and need MCP plus vector-store integration. Does not fit non-Java teams, turnkey agents, or lightweight scripting.
中文生态China availability 国产 / 国内可直接用 / 备案状态 · 快照domestic / direct access / CAC filing · snapshot 2026-11-03
- 出品属地Origin
- 国外出品foreign-made Spring 项目(VMware/Broadcom 生态)。Spring project (VMware/Broadcom ecosystem).
- 国内使用Direct access
- 大陆可直连direct OK docs.spring.io 大陆直连未核验;Maven Central 可经镜像获取。Direct reachability from mainland not verified; Maven Central is available through mirrors.
- 备案状态CAC filing
- 未见于备案名单not in filing list:未见于网信办公示名单(2026-11-03 检索);开源框架未面向大陆公众提供服务,备案不适用。Not in the CAC public registry (searched 2026-11-03); the open-source framework does not serve the mainland public, so filing does not apply.
备案信息以网信办《生成式人工智能服务已备案信息》公示名单为准(按批次滚动更新,本站只抄编号不解读);「大陆可直连」是本站从大陆网络直连实测的结果,不是厂商承诺。GitHub 类站点当日实测有波动,口径写在依据里。Filing status is quoted from the CAC public registry (updated batch by batch; this site copies the number and does not interpret it). "Direct access" is this site's own reachability measurement from a mainland network, not a vendor promise. GitHub-hosted sites fluctuated on the measurement day — the note says so.
固定坐标系Fixed coordinate system
8 个维度dimensions, 与同分区其他对象逐项可比each comparable item by item against others in the same section.
- 模型与开放条件Model & openness
可移植的 Model API:用统一接口接多家模型供应商;官方文档列出 ChatClient 与模型 API。 当前支持列表以官方文档为准,本站未逐条清点。
A portable Model API behind one interface across providers; official docs list ChatClient and the model APIs. The current supported list follows official docs and is not enumerated here.
- 运行位置Where it runs
运行在 Spring Boot 应用内:官方提供 starters 与 auto-configuration, 模型与向量库以 Spring Bean 方式注入。
Runs inside a Spring Boot application: official starters and auto-configuration inject models and vector stores as Spring beans.
- 本地文件Local files
文档摄取(ETL)与向量库由应用配置;框架本身不托管数据, 索引落盘位置与检索链路由所选向量库决定。
Document ingestion (ETL) and vector stores are configured by the application; the framework hosts no data itself.
- 关机后的任务Tasks after shutdown
库形态,不内建任务队列;异步与长任务由 Spring 侧自行编排。
A library with no built-in task queue; async and long-running work is orchestrated on the Spring side.
- 工具与扩展Tools & extensions
支持工具调用与 MCP:官方文档写明可消费 MCP server,也可把 Spring 服务暴露给 AI 生态。
Supports tool calling and MCP: official docs state it can consume MCP servers and expose Spring services to the AI ecosystem.
- 上下文与记忆Context & memory
对话记忆由 ChatClient 与 memory 配置管理;持久化需自己接存储。
Conversation memory is managed through ChatClient and memory configuration; persistence is yours to attach.
- 权限与限制Permissions & limits
Spring Security 体系内运行;权限由应用配置,无内置多租户隔离。
Runs within Spring Security; permissions are application-configured, with no built-in multi-tenant isolation.
- 适合什么任务Best for
适合:Spring Boot 团队、要把 AI 能力做成标准 Spring 组件、需要 MCP 与向量库集成。 不适合:非 Java 团队、要成品 agent、要轻量脚本式调用。
Fits Spring Boot teams who want AI as standard Spring components and need MCP plus vector-store integration. Does not fit non-Java teams, turnkey agents, or lightweight scripting.
头号误解Top misconception
- 把 Spring AI 当成 LangChain4j 的官方版——两者是不同项目,抽象与生态不同Treating Spring AI as the official version of LangChain4j — they are different projects with different abstractions
- 以为加了 starter 就自动配好模型——仍需 API key 与模型配置Assuming a starter auto-configures a model — you still need an API key and model configuration
- 忽略 Spring 版本兼容——starters 与 Boot 版本要对齐Ignoring Spring version compatibility — starters and Boot versions must align
未知项清单Known unknowns
- 当前支持的模型与向量库完整清单(未逐条清点)
- MCP 双向集成的版本与限制
- Spring Boot 版本兼容矩阵
- Full current list of supported models and vector stores (not enumerated here)
- Versions and limits of bidirectional MCP integration
- Spring Boot compatibility matrix
证据来源Evidence sources
判断可回到以下一手源复核。本站核验日Every judgement can be rechecked against the primary sources below. Verified on 2026-11-03,内容更新日content updated on 2026-11-03。
| 类型Type | 名称Name | 链接Link |
|---|---|---|
| docs | Spring AI · 官方参考文档(Model API / ChatClient / MCP / ETL;2026-11-03 复核官方页)Spring AI · official reference docs (Model API / ChatClient / MCP / ETL) | https://docs.spring.io/spring-ai/reference/ |
| official | Spring AI · 项目主页(Spring AI 2.0 定位)Spring AI · project home (Spring AI 2.0 positioning) | https://spring.io/projects/spring-ai/ |
| repo | Spring AI · GitHub 仓库Spring AI · GitHub repository | https://github.com/spring-projects/spring-ai |
| changelog | Spring AI · Releases(官方 changelog)Spring AI · Releases (official changelog) | https://github.com/spring-projects/spring-ai/releases |
实测记录Measured runs
本档未跑集成与性能实测;结论只覆盖 API 与官方文档披露的能力面。
This site has not completed integration or performance tests; the conclusions cover the API and capabilities disclosed in official docs only.
相关条目Related entries
- LangChain4jLangChain4j另一条 Java 路线,抽象更偏 LangChain 风格Another Java route with a more LangChain-like abstraction.
- LangChainLangChainPython 侧同类框架,对照读A Python-side counterpart to read in contrast.
- vLLMvLLM另一层 · 本地模型运行器Other layer · Local model runners
本页由This page is generated from the ai-handbook 数据层生成(CC BY 4.0)。data layer (CC BY 4.0).
方法论与坐标系定义见仓库内For the methodology and coordinate definitions, see METHODOLOGY.md.