
llm-apps-java-spring-ai
用 Java 和 Spring AI 快速构建 LLM 应用,从示例到实战。
项目预览
项目数据
项目介绍
Star 增长趋势
本站每日记录该项目 GitHub 星标变化,观测越久曲线越完整
数据来源:GitHub API 逐日快照 · 收录于 2026-08-09 · 当前星标 ★ 786
使用教程
环境要求
- JDK 17+
- Maven
- 模型 Key
安装与启动步骤
-
1看示例
Spring AI 的 Java 示例集合,覆盖 RAG、工具调用等。
https://github.com/ThomasVitale/llm-apps-java-spring-ai -
2挑一个跑
每个示例是独立 Maven 工程。
cd <example> && ./mvnw spring-boot:run -
3配 Key
Spring AI 通过配置项读 Key。
export OPENAI_API_KEY=sk-xxx -
4改造成自己的
把示例的 controller 换成业务逻辑即可。
读 src/main/java 下的 ChatController
如何确认成功
启动后访问示例接口能返回模型回复。
注意事项
- Java 生态做 AI 应用,Spring AI 是当前最省心的选择。
- 示例依赖的模型可能已下线,改 application.yml 里的模型名。
- 工具调用部分最值得读,那是 Agent 的基础。
核心亮点
- 官方示例风格,代码规范,直接展示 Spring AI 最佳实践
- 覆盖 RAG、函数调用、多模态等热门高级场景,不止于聊天
- 支持 OpenAI、Azure、Ollama 多模型切换,方便本地测试
不足之处
- 示例项目,未提供生产级部署或性能优化方案
- 文档/社区待观察
适用场景
- Java 团队快速评估 Spring AI 集成 LLM 的可行性
- 学习如何实现 RAG 和函数调用等复杂 AI 功能
- 作为 Spring Boot 应用接入 AI 能力的脚手架参考
替代项目
langchain4j、spring-ai-examples、openai-java
上一篇:CodeFuse-muAgent
下一篇:swiftide
同类项目推荐
railtracks
开源
让AI代理更抗造,干活不翻车
An agentic framework that helps developers build resilient agentic systems
agents-cli
开源
让编码助手一键生成、评估并部署 Google Cloud AI Agent
The CLI and skills that turn any coding assistant into an expert at creating, evalua···
ComfyUI-MultiGPU
开源
一键扩展显存,多卡并行跑大模型,低配也能生成高清视频。
This custom_node for ComfyUI adds one-click "Virtual VRAM" for any UNet and CLIP loa···
llamabot
开源
用 Python 类优雅调用大模型,告别杂乱提示词
Pythonic class-based interface to LLMs
chatgpt-plugin
开源
用 Cloudflare Workers 快速构建并部署 ChatGPT 插件,免服务器低成本上线。
Build ChatGPT plugins with Cloudflare's Developer Platform
MakerAi
开源
在 Delphi 中直接调用大模型,构建 AI 原生应用
The AI Operating System for Delphi. 100% native framework with RAG 2.0, autonomous a···
mastra
开源
用 TypeScript 快速构建 AI 应用和智能体,开箱即用。
Mastra is the modern TypeScript framework for AI-powered applications and agents.
don-cheli-sdd
开源
给 AI 编程套上工程规范,从需求到代码全程可控。
Don Cheli — SDD Framework. The most comprehensive Specification-Driven Development ···
incur
开源
一套 CLI,人和 Agent 都能稳定调用
CLI framework for agents and humans