spring-ai-alibaba-examples:基于 Spring AI 与 Spring AI Alibaba 的示例项目

用户可通过此项目学习 Spring AI 和 Spring AI Alibaba 从基础到高级的各种用法及 AI 项目最佳实践,包含多个 Example 模块,展示核心功能与应用方法。【此简介由AI生成】

分支2Tags0
文件最后提交记录最后更新时间
fix: skill (#425) 4 个月前
ci: update saa playground ci run condition Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> 4 个月前
chore: add license and newline 7 个月前
feat: add Python A2A agent example with Nacos registration (#416) 4 个月前
feat(voice-agent-example): implement voice agent pipeline integrating STT, Agent, and TTS via spring-ai-alibaba-extensions. (#445) feat(voice-agent-example): implement voice agent pipeline integrating STT, Agent, and TTS via spring-ai-alibaba-extensions2 个月前
feat: audio stream (#448) 3 个月前
Feat claudecode skill (#408) * feat: 为项目生成完整的API文档和模块文档 - 新增Claude Code技能框架:http-generate、readme-generate、skill-creator - 为76个包含Web接口的模块生成.http文件,涵盖100+个Controller类 - 为46个缺少文档的模块生成README.md文件,包含完整的API文档和使用说明 - 更新CLAUDE.md文件,提供项目开发指导 - 新增task/module-generate.md文档,描述自动化文档生成任务 生成的文档特点: - HTTP文件:包含完整的REST API请求示例,支持IDE直接运行 - README文件:统一的中文文档格式,包含功能介绍、API文档、使用示例、技术实现等 - 提升项目文档完整性,降低开发者学习和使用门槛 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: 恢复被覆盖的重要README文件,整合原有技术文档与新生成API文档 ## 恢复的关键文档 ### RAG相关模块 - **rag-milvus-example**: 恢复Milvus向量数据库配置、Docker部署、集合加载步骤 - **rag-elasticsearch-example**: 恢复Local/Cloud RAG流程详解、Elasticsearch配置 - **rag-pgvector-example**: 恢复PostgreSQL+pgvector数据库创建脚本、HNSW索引配置 - **rag-openai-dashscope-pgvector-example**: 恢复MXY RAG Server架构、多模型集成 - **module-rag**: 恢复Spring AI Module RAG技术架构、Pre-Retrieval模块详解 ### 基础模块 - **helloworld**: 恢复完整的入门示例,包含环境配置、快速开始指南 ## 恢复的重要内容 ### 技术实现细节 - 详细的数据库配置和SQL脚本 - Docker Compose部署指南 - 向量索引创建和优化配置 - RAG流程的完整技术说明 ### 配置和部署 - application.yml完整配置示例 - 环境变量和依赖说明 - 性能优化建议 - 故障排查指南 ### API文档整合 - 保留新生成的标准化API文档格式 - 整合原有的curl命令示例 - 统一的接口说明和参数描述 ## 改进效果 ✅ **技术完整性**: 恢复了丢失的重要技术实现细节 ✅ **配置完整性**: 保留了完整的部署和配置说明 ✅ **文档一致性**: 统一了文档格式,同时保留了重要信息 ✅ **可用性提升**: 开发者可以获得完整的使用指南 ## 文件统计 - 恢复了6个重要的README文件 - 保留了原有的技术细节和配置说明 - 整合了新生成的API文档格式 - 新增readme-overwrite.md任务文档 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: doc * fix: doc --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>5 个月前
chore: add env templates to more dashscope examples (#458) Co-authored-by: however <however-yir@users.noreply.github.com> Co-authored-by: shown <yuluo08290126@gmail.com>1 个月前
bugfix: Modify elasticsearch-java version to be consistent with Spring AI (#415) * bugfix: When I started the rag-elasticsearch-example project, there was a version incompatibility issue * bugfix: When I started the rag-elasticsearch-example project, there was a version incompatibility issue4 个月前
Feat claudecode skill (#408) * feat: 为项目生成完整的API文档和模块文档 - 新增Claude Code技能框架:http-generate、readme-generate、skill-creator - 为76个包含Web接口的模块生成.http文件,涵盖100+个Controller类 - 为46个缺少文档的模块生成README.md文件,包含完整的API文档和使用说明 - 更新CLAUDE.md文件,提供项目开发指导 - 新增task/module-generate.md文档,描述自动化文档生成任务 生成的文档特点: - HTTP文件:包含完整的REST API请求示例,支持IDE直接运行 - README文件:统一的中文文档格式,包含功能介绍、API文档、使用示例、技术实现等 - 提升项目文档完整性,降低开发者学习和使用门槛 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: 恢复被覆盖的重要README文件,整合原有技术文档与新生成API文档 ## 恢复的关键文档 ### RAG相关模块 - **rag-milvus-example**: 恢复Milvus向量数据库配置、Docker部署、集合加载步骤 - **rag-elasticsearch-example**: 恢复Local/Cloud RAG流程详解、Elasticsearch配置 - **rag-pgvector-example**: 恢复PostgreSQL+pgvector数据库创建脚本、HNSW索引配置 - **rag-openai-dashscope-pgvector-example**: 恢复MXY RAG Server架构、多模型集成 - **module-rag**: 恢复Spring AI Module RAG技术架构、Pre-Retrieval模块详解 ### 基础模块 - **helloworld**: 恢复完整的入门示例,包含环境配置、快速开始指南 ## 恢复的重要内容 ### 技术实现细节 - 详细的数据库配置和SQL脚本 - Docker Compose部署指南 - 向量索引创建和优化配置 - RAG流程的完整技术说明 ### 配置和部署 - application.yml完整配置示例 - 环境变量和依赖说明 - 性能优化建议 - 故障排查指南 ### API文档整合 - 保留新生成的标准化API文档格式 - 整合原有的curl命令示例 - 统一的接口说明和参数描述 ## 改进效果 ✅ **技术完整性**: 恢复了丢失的重要技术实现细节 ✅ **配置完整性**: 保留了完整的部署和配置说明 ✅ **文档一致性**: 统一了文档格式,同时保留了重要信息 ✅ **可用性提升**: 开发者可以获得完整的使用指南 ## 文件统计 - 恢复了6个重要的README文件 - 保留了原有的技术细节和配置说明 - 整合了新生成的API文档格式 - 新增readme-overwrite.md任务文档 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: doc * fix: doc --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>5 个月前
feat: audio stream (#448) 3 个月前
chore: add env templates to more dashscope examples (#458) Co-authored-by: however <however-yir@users.noreply.github.com> Co-authored-by: shown <yuluo08290126@gmail.com>1 个月前
chore: add env templates to more dashscope examples (#458) Co-authored-by: however <however-yir@users.noreply.github.com> Co-authored-by: shown <yuluo08290126@gmail.com>1 个月前
chore(examples): add .env.example for MCP/RAG/tool-calling modules (#453) Co-authored-by: however <however-yir@users.noreply.github.com> Co-authored-by: shown <yuluo08290126@gmail.com>1 个月前
chore: update pom desc (#434) 4 个月前
bugfix: fixed issues such as mismatch between port numbers in .http files and .yml files, and some formatting problems. (#412) * bugfix:ensure the correct port number and formatting issues * bugfix:ensure the correct port number and formatting issues --------- Co-authored-by: maple <14118288+gao-shengkai525866@user.noreply.gitee.com>5 个月前
bugfix: fixed issues such as mismatch between port numbers in .http files and .yml files, and some formatting problems. (#412) * bugfix:ensure the correct port number and formatting issues * bugfix:ensure the correct port number and formatting issues --------- Co-authored-by: maple <14118288+gao-shengkai525866@user.noreply.gitee.com>5 个月前
bugfix: fixed issues such as mismatch between port numbers in .http files and .yml files, and some formatting problems. (#412) * bugfix:ensure the correct port number and formatting issues * bugfix:ensure the correct port number and formatting issues --------- Co-authored-by: maple <14118288+gao-shengkai525866@user.noreply.gitee.com>5 个月前
bugfix: fixed issues such as mismatch between port numbers in .http files and .yml files, and some formatting problems. (#412) * bugfix:ensure the correct port number and formatting issues * bugfix:ensure the correct port number and formatting issues --------- Co-authored-by: maple <14118288+gao-shengkai525866@user.noreply.gitee.com>5 个月前
Feat claudecode skill (#408) * feat: 为项目生成完整的API文档和模块文档 - 新增Claude Code技能框架:http-generate、readme-generate、skill-creator - 为76个包含Web接口的模块生成.http文件,涵盖100+个Controller类 - 为46个缺少文档的模块生成README.md文件,包含完整的API文档和使用说明 - 更新CLAUDE.md文件,提供项目开发指导 - 新增task/module-generate.md文档,描述自动化文档生成任务 生成的文档特点: - HTTP文件:包含完整的REST API请求示例,支持IDE直接运行 - README文件:统一的中文文档格式,包含功能介绍、API文档、使用示例、技术实现等 - 提升项目文档完整性,降低开发者学习和使用门槛 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: 恢复被覆盖的重要README文件,整合原有技术文档与新生成API文档 ## 恢复的关键文档 ### RAG相关模块 - **rag-milvus-example**: 恢复Milvus向量数据库配置、Docker部署、集合加载步骤 - **rag-elasticsearch-example**: 恢复Local/Cloud RAG流程详解、Elasticsearch配置 - **rag-pgvector-example**: 恢复PostgreSQL+pgvector数据库创建脚本、HNSW索引配置 - **rag-openai-dashscope-pgvector-example**: 恢复MXY RAG Server架构、多模型集成 - **module-rag**: 恢复Spring AI Module RAG技术架构、Pre-Retrieval模块详解 ### 基础模块 - **helloworld**: 恢复完整的入门示例,包含环境配置、快速开始指南 ## 恢复的重要内容 ### 技术实现细节 - 详细的数据库配置和SQL脚本 - Docker Compose部署指南 - 向量索引创建和优化配置 - RAG流程的完整技术说明 ### 配置和部署 - application.yml完整配置示例 - 环境变量和依赖说明 - 性能优化建议 - 故障排查指南 ### API文档整合 - 保留新生成的标准化API文档格式 - 整合原有的curl命令示例 - 统一的接口说明和参数描述 ## 改进效果 ✅ **技术完整性**: 恢复了丢失的重要技术实现细节 ✅ **配置完整性**: 保留了完整的部署和配置说明 ✅ **文档一致性**: 统一了文档格式,同时保留了重要信息 ✅ **可用性提升**: 开发者可以获得完整的使用指南 ## 文件统计 - 恢复了6个重要的README文件 - 保留了原有的技术细节和配置说明 - 整合了新生成的API文档格式 - 新增readme-overwrite.md任务文档 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: doc * fix: doc --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>5 个月前
fix: fix playground example build error (#433) 4 个月前
bugfix: fixed issues such as mismatch between port numbers in .http files and .yml files, and some formatting problems. (#412) * bugfix:ensure the correct port number and formatting issues * bugfix:ensure the correct port number and formatting issues --------- Co-authored-by: maple <14118288+gao-shengkai525866@user.noreply.gitee.com>5 个月前
chore(examples): add .env.example for MCP/RAG/tool-calling modules (#453) Co-authored-by: however <however-yir@users.noreply.github.com> Co-authored-by: shown <yuluo08290126@gmail.com>1 个月前
feature(sanbox): add fullstack sandbox example (#447) Co-authored-by: shown <yuluo08290126@gmail.com> 2 个月前
bugfix: fixed issues such as mismatch between port numbers in .http files and .yml files, and some formatting problems. (#412) * bugfix:ensure the correct port number and formatting issues * bugfix:ensure the correct port number and formatting issues --------- Co-authored-by: maple <14118288+gao-shengkai525866@user.noreply.gitee.com>5 个月前
chore(examples): add .env.example for MCP/RAG/tool-calling modules (#453) Co-authored-by: however <however-yir@users.noreply.github.com> Co-authored-by: shown <yuluo08290126@gmail.com>1 个月前
bugfix: fixed issues such as mismatch between port numbers in .http files and .yml files, and some formatting problems. (#412) * bugfix:ensure the correct port number and formatting issues * bugfix:ensure the correct port number and formatting issues --------- Co-authored-by: maple <14118288+gao-shengkai525866@user.noreply.gitee.com>5 个月前
feat: audio stream (#448) 3 个月前
chore: add license and newline 7 个月前
feat(rag-parallel): Provide an implementation of multiplexed recall (#441) 3 个月前
Feat claudecode skill (#408) * feat: 为项目生成完整的API文档和模块文档 - 新增Claude Code技能框架:http-generate、readme-generate、skill-creator - 为76个包含Web接口的模块生成.http文件,涵盖100+个Controller类 - 为46个缺少文档的模块生成README.md文件,包含完整的API文档和使用说明 - 更新CLAUDE.md文件,提供项目开发指导 - 新增task/module-generate.md文档,描述自动化文档生成任务 生成的文档特点: - HTTP文件:包含完整的REST API请求示例,支持IDE直接运行 - README文件:统一的中文文档格式,包含功能介绍、API文档、使用示例、技术实现等 - 提升项目文档完整性,降低开发者学习和使用门槛 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: 恢复被覆盖的重要README文件,整合原有技术文档与新生成API文档 ## 恢复的关键文档 ### RAG相关模块 - **rag-milvus-example**: 恢复Milvus向量数据库配置、Docker部署、集合加载步骤 - **rag-elasticsearch-example**: 恢复Local/Cloud RAG流程详解、Elasticsearch配置 - **rag-pgvector-example**: 恢复PostgreSQL+pgvector数据库创建脚本、HNSW索引配置 - **rag-openai-dashscope-pgvector-example**: 恢复MXY RAG Server架构、多模型集成 - **module-rag**: 恢复Spring AI Module RAG技术架构、Pre-Retrieval模块详解 ### 基础模块 - **helloworld**: 恢复完整的入门示例,包含环境配置、快速开始指南 ## 恢复的重要内容 ### 技术实现细节 - 详细的数据库配置和SQL脚本 - Docker Compose部署指南 - 向量索引创建和优化配置 - RAG流程的完整技术说明 ### 配置和部署 - application.yml完整配置示例 - 环境变量和依赖说明 - 性能优化建议 - 故障排查指南 ### API文档整合 - 保留新生成的标准化API文档格式 - 整合原有的curl命令示例 - 统一的接口说明和参数描述 ## 改进效果 ✅ **技术完整性**: 恢复了丢失的重要技术实现细节 ✅ **配置完整性**: 保留了完整的部署和配置说明 ✅ **文档一致性**: 统一了文档格式,同时保留了重要信息 ✅ **可用性提升**: 开发者可以获得完整的使用指南 ## 文件统计 - 恢复了6个重要的README文件 - 保留了原有的技术细节和配置说明 - 整合了新生成的API文档格式 - 新增readme-overwrite.md任务文档 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * fix: doc * fix: doc --------- Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>5 个月前
docs: add docs Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> 1 年前
Update CONTRIBUTION.md1 年前
Initial commit1 年前
chore: add license and newline 7 个月前
chore: update readme and pom Signed-off-by: yuluo-yx <yuluo08290126@gmail.com> 7 个月前
docs: improve quickstart onboarding and troubleshooting (#457) Co-authored-by: however <however-yir@users.noreply.github.com>1 个月前
feat(voice-agent-example): implement voice agent pipeline integrating STT, Agent, and TTS via spring-ai-alibaba-extensions. (#445) feat(voice-agent-example): implement voice agent pipeline integrating STT, Agent, and TTS via spring-ai-alibaba-extensions2 个月前

Spring AI Alibaba Examples

Spring AI Alibaba 代码库:https://github.com/alibaba/spring-ai-alibaba

Spring AI Alibaba 官网:https://java2ai.com

Spring AI Alibaba 官网代码库:https://github.com/springaialibaba/spring-ai-alibaba-website

English | 中文

介绍

本仓库包含多个示例模块项目,旨在介绍 Spring AI 和 Spring AI Alibaba 从基础到高级的各种用法以及 AI 项目的最佳实践。

更详细的介绍,请参阅各个子项目中的 README.md 以及 Spring AI Alibaba 官网

参与建设

欢迎任何形式的代码贡献。

快速入门矩阵(社区贡献)

模块 用途 命令 所需服务 环境变量 环境模板 入口
spring-ai-alibaba-helloworld 基础聊天和顾问示例 mvn -pl spring-ai-alibaba-helloworld spring-boot:run AI_DASHSCOPE_API_KEY README
spring-ai-alibaba-chat-example/dashscope-chat DashScope 聊天基础 mvn -pl spring-ai-alibaba-chat-example/dashscope-chat spring-boot:run AI_DASHSCOPE_API_KEY README
spring-ai-alibaba-image-example/dashscope-image DashScope 图像生成 mvn -pl spring-ai-alibaba-image-example/dashscope-image spring-boot:run AI_DASHSCOPE_API_KEY README
spring-ai-alibaba-mcp-example MCP 演示 mvn -pl spring-ai-alibaba-mcp-example spring-boot:run 无/本地 mcp 工具 model api key .env.example README
spring-ai-alibaba-rag-example RAG 演示 mvn -pl spring-ai-alibaba-rag-example spring-boot:run 向量数据库(可选,通过配置文件) model api key, embedding model .env.example README
spring-ai-alibaba-tool-calling-example 工具调用 mvn -pl spring-ai-alibaba-tool-calling-example spring-boot:run model api key, map api key .env.example README

常用配置键速查

配置键 常见模块 说明
AI_DASHSCOPE_API_KEY spring-ai-alibaba-helloworld、DashScope chat/image、tool calling、evaluation、很多 graph/rag 示例 DashScope 兼容模型最常见的 API Key
OPENAI_API_KEY spring-ai-alibaba-chat-example/openai-chatspring-ai-alibaba-chat-example/vllm-chat OpenAI 兼容接口示例常用
AI_OPENAI_API_KEY spring-ai-alibaba-image-example/openai-image OpenAI 图片生成示例使用
AI_DEEPSEEK_API_KEY spring-ai-alibaba-chat-example/deepseek-chatspring-ai-alibaba-mem0-example DeepSeek 相关示例使用
MINIMAX_API_KEY spring-ai-alibaba-chat-example/minimax-chat MiniMax 模型示例使用
ZHIPUAI_API_KEY spring-ai-alibaba-chat-example/zhipuai-chat 智谱模型示例使用
BAIDU_MAP_API_KEY spring-ai-alibaba-tool-calling-example 地图工具调用示例需要

常见启动问题 / Troubleshooting

  • AI_DASHSCOPE_API_KEY 未设置 / Missing AI_DASHSCOPE_API_KEY: 先确认环境变量已在当前 shell 或 IDE 中生效,再重新启动示例。
  • 端口被占用 / Port already in use: 检查对应模块 application.yml 中的 server.port,释放端口或改端口后重试。
  • 本地依赖未启动 / Required local services not running: RAG、MCP、向量库或 Docker 相关示例通常需要先启动对应的中间件或容器。
  • 模块里暂时没有 .env.example / No .env.example in a module yet: 优先查看该模块 README 和 src/main/resources/application.yml,确认真实的变量名和依赖服务。

项目介绍

用户可通过此项目学习 Spring AI 和 Spring AI Alibaba 从基础到高级的各种用法及 AI 项目最佳实践,包含多个 Example 模块,展示核心功能与应用方法。【此简介由AI生成】

定制我的领域

下载使用量

0

项目总下载次数(含Clone、Pull、 zip 包及 release 下载),每日凌晨更新

语言类型

Java66.38%
TSX7.84%
HTML7.15%
Vue7.13%
TypeScript4.25%