Content
<p align="left">
<a href="README.md" target="_blank"><img src="https://img.shields.io/badge/lang-English-blue?logo=googletranslate" alt="English" style="vertical-align:middle; margin-right:4px;"/></a>
<a href="README_EN.md" target="_blank"><img src="https://img.shields.io/badge/lang-English-blue?logo=googletranslate" alt="English" style="vertical-align:middle; margin-right:4px;"/></a>
<a href="https://github.com/java-ai-tech/spring-ai-summary/wiki" target="_blank"><img src="https://img.shields.io/badge/doc-wiki-blue?logo=readthedocs" alt="document" style="vertical-align:middle; margin-right:4px;"/></a>
<img src="https://img.shields.io/badge/spring--ai--summary-v1.0.0-blue.svg" alt="Spring AI Summary" style="vertical-align:middle; margin-right:4px;"/>
<img src="https://visitor-badge.laobi.icu/badge?page_id=java-ai-tech.spring-ai-summary" alt="Visitors" style="vertical-align:middle; margin-right:4px;"/>
</p>
**Spring AI Summary** is a collection of modular example projects based on the native **Spring AI** framework, providing clear code examples and detailed documentation to help developers quickly master the core features of Spring AI.
### 👥 Target Audience
Spring AI Summary is designed for developers interested in the Spring AI framework, whether beginners or experienced engineers. Through this project, you can:
- Master the core concepts and features of Spring AI.
- Learn how to build efficient AI applications.
- Stay updated with the latest technology trends and practical experiences.
**Join the Community** 🎯 Scan the QR code to add the group administrator's WeChat (remark: Spring AI) and explore the infinite possibilities of Spring AI together!
<p align="center">
<img width="189" alt="Community Exchange Group" src="docs/statics/my_chat.png" />
</p>
## 📖 Learning Path
If you're new to Spring AI, we recommend starting with the [official Spring AI documentation](https://spring.io/projects/spring-ai) to understand the basic concepts and usage. Then, practice with the various modules in this project to gain a deeper understanding of the framework's core features.
**Recommended Learning Order**:
1. 📚 [Official Spring AI Documentation](https://spring.io/projects/spring-ai) - Understand the basics
2. 💬 **spring-ai-chat** - Chat application development (required starting point)
3. 🔧 **spring-ai-tool-calling** - Tool calling capability
4. 🧠 **spring-ai-vector** - Vector database integration
5. 🚀 **MCP/RAG/AGENT** - Advanced application modes
👇Start your Spring AI journey below!
## 🚀 Quick Start
### ⚙️ Environment Requirements
| Dependency | Version/Requirements | Description |
| -------------- |-----------------------|--------------------|
| SpringBoot | 3.3.6 | - |
| Spring AI | 1.0.0 | - |
| JDK | 21+ | - |
| Maven | 3.6+ | Highly recommend using mvnd instead of mvn |
| Docker | (for running Milvus, Nacos, etc.) | |
### 1. 🧬 Clone the Project
```bash
# Clone the project to your local machine
git clone https://github.com/java-ai-tech/spring-ai-summary.git
# Enter the project and compile
cd spring-ai-summary && mvn clean compile -DskipTests
```
> If you encounter slow Maven dependency downloads, consider using a domestic Maven mirror source, such as Alibaba Cloud or Tsinghua University. If you have any issues during the process, scan the QR code to join the WeChat group for consultation.
### 2. 🛠️ Configure Environment Variables
For each module's `application.yml`/`application.properties` file in the `resource` folder, configure the corresponding API key according to your needs. For example, in the **spring-ai-chat-deepseek** module:
```properties
# Example: deepseek module configuration
spring.ai.deepseek.api-key=${spring.ai.deepseek.api-key}
spring.ai.deepseek.base-url=https://api.deepseek.com
spring.ai.deepseek.chat.completions-path=/v1/chat/completions
spring.ai.deepseek.chat.options.model=deepseek-chat
```
Replace your `spring.ai.deepseek.api-key` with the actual API key to start running. For information on how to apply for an API key, visit the project's [Wiki page](https://github.com/java-ai-tech/spring-ai-summary/wiki).
> 💡 **Security Tip**: Store API keys using environment variables to avoid code leaks. [Apply for Key Guide](https://github.com/java-ai-tech/spring-ai-summary/wiki)
### 3. ▶️ Run the Example
After completing the above steps, you can choose to run different example modules to experience Spring AI's features. For example, start and run the **spring-ai-chat-deepseek** module (the specific port can be configured according to your own configuration):
```bash
2025-06-04T14:18:43.939+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [ main] c.g.ai.chat.deepseek.DsChatApplication : Starting DsChatApplication using Java 21.0.2 with PID 88446 (/Users/glmapper/Documents/projects/glmapper/spring-ai-summary/spring-ai-chat/spring-ai-chat-deepseek/target/classes started by glmapper in /Users/glmapper/Documents/projects/glmapper/spring-ai-summary)
2025-06-04T14:18:43.941+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [ main] c.g.ai.chat.deepseek.DsChatApplication : The following 1 profile is active: "deepseek"
2025-06-04T14:18:44.469+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8081 (http)
2025-06-04T14:18:44.475+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2025-06-04T14:18:44.476+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.33]
2025-06-04T14:18:44.501+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2025-06-04T14:18:44.502+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 533 ms
2025-06-04T14:18:44.962+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [ main] o.s.b.a.e.web.EndpointLinksResolver : Exposing 14 endpoints beneath base path '/actuator'
2025-06-04T14:18:44.988+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8081 (http) with context path '/'
2025-06-04T14:18:44.997+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [ main] c.g.ai.chat.deepseek.DsChatApplication : Started DsChatApplication in 1.215 seconds (process running for 1.637)
2025-06-04T14:18:45.175+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [on(2)-127.0.0.1] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring DispatcherServlet 'dispatcherServlet'
2025-06-04T14:18:45.175+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [on(2)-127.0.0.1] o.s.web.servlet.DispatcherServlet : Initializing Servlet 'dispatcherServlet'
2025-06-04T14:18:45.176+08:00 INFO 88446 --- [spring-ai-chat-deepseek] [on(2)-127.0.0.1] o.s.web.servlet.DispatcherServlet : Completed initialization in 1 ms
```
If you see a similar startup log, congratulations, you have successfully started! 🎉🎉🎉🎉🎉 You can now start exploring various functional modules. After startup, you can test using tools like cUrl, HTTPie, or Postman.
```bash
curl localhost:8081/api/deepseek/chatWithMetric?userInput="Who are you?"
```
Result:
**Success Indicator** 🎉: Seeing a similar response indicates successful execution!

```bash
# completion tokens
http://localhost:8081/actuator/metrics/ai.completion.tokens
# prompt tokens
http://localhost:8081/actuator/metrics/ai.prompt.tokens
# total tokens
http://localhost:8081/actuator/metrics/ai.total.tokens
```
For example, using `ai.completion.tokens`:
```json
{
"name": "ai.completion.tokens",
"measurements": [
{
"statistic": "COUNT",
"value": 34
}
],
"availableTags": []
}
```
**For information on using other modules and configurations, visit the [Wiki page](https://github.com/java-ai-tech/spring-ai-summary/wiki) or each module's `README.md` file.**
## 📚 Learning Resources (Continuously Updated)
Here are some recommended learning resources:
> The official [Awesome Spring AI](https://github.com/spring-ai-community/awesome-spring-ai) also provides a summary of learning resources, mainly from abroad. This project focuses on summarizing domestic learning resources for your reference.
#### Technical Communities
- [Official Spring AI Documentation](https://spring.io/projects/spring-ai)
- [Spring AI Alibaba Official Documentation](https://github.com/alibaba/spring-ai-alibaba)
#### Project Series
- [MindMark (Heart Mark) is a RAG system based on SpringAI](https://gitee.com/mumu-osc/mind-mark)
- [My AI Agent is an intelligent agent service built using Spring Boot and Spring AI framework](https://github.com/Cunninger/my-ai-agent)
# Tool List
## Blog Series
- [A Developer's Ramblings -- Spring AI Series](https://cloud.tencent.com/developer/column/72423) Because the author did not manage the column, the link leads to the homepage; additionally, this series of articles is very good for learning some design ideas and implementation methods of Spring AI, but it was written based on the M series version, so some content may not be consistent with the latest version.
- [In-depth Analysis of Spring AI Series](https://www.cnblogs.com/guoxiaoyu/p/18666904)
- [How to Build MCP Client-Server Architecture with Spring AI](https://spring.didispace.com/article/spring-ai-mcp.html)
- [Building Effective Agents with Spring AI](https://spring.io/blog/2025/01/21/spring-ai-agentic-patterns) 🌟🌟🌟🌟🌟
- [Analysis and Simple Use of Spring AI Large Model Return Content Formatting Source Code](https://juejin.cn/post/7378696051082199080)
- [Spring AI EmbeddingModel Concept and Source Code Analysis](https://my.oschina.net/u/2391658/blog/18534829)
- [Full RAG Technology: A Simpler and More Practical Implementation Method](https://www.readme-i18n.com/FareedKhan-dev/all-rag-techniques?lang=en)
- [Spring AI Framework Principle and Practice](https://juejin.cn/column/7375109287716372520) 🌟🌟🌟
- Large Model Technology Popularization
- [LLM Series (1): Development History](https://mp.weixin.qq.com/s/72omFtMqinJs4MMX41MCyw)
- [LLM Series (2): Basic Concepts](https://mp.weixin.qq.com/s/Fg0bczAxejgKs_65kWxWSg)
- [LLM Series (3): Architecture Patterns](https://mp.weixin.qq.com/s/d6Y76I_Vxfmj6wa5sAN3uQ)
- [LLM Series (4): Magical Numbers](https://mp.weixin.qq.com/s/tEozMs4QWDYx5vrhitA9uQ)
- [LLM Series (5): Model Training](https://mp.weixin.qq.com/s/TK8rTcrjS1pfigQxj2mq8A)
- [LLM Series (6): Model Inference](https://mp.weixin.qq.com/s/tjXme2CWnUxLmawDDiylWQ)
- [LLM Series (7): Mathematical Concepts](https://mp.weixin.qq.com/s/SBtmPoWtAoguWFUVPB1PGQ)
- [LLM Series (8): RAG](https://mp.weixin.qq.com/s/y4yAGqs6p4PhErPmRKtDkg)
- [LLM Series (9): RAG Extra - From Document to Vector](https://mp.weixin.qq.com/s/HojxR-tC5Gxn3tsxCz17Ow)
- [LLM Series (10): RAG Extra - Vector Retrieval](https://mp.weixin.qq.com/s/QFnfBU2we_4UG6v4spEFgA)
- [LLM Series (11): Model Accuracy](https://mp.weixin.qq.com/s/E_AeSOGYzoynm5hVicaKfw)
- [LLM Series (12): Interpretation of Function Calling](https://mp.weixin.qq.com/s/RiILquzDnKZCaZG8nry2Eg)
- [LLM Series (13): Interpretation of Context Engineering](https://mp.weixin.qq.com/s/o77X-ZKBbSwYq0qMqpTP4Q)
- [LLM Series (14): Interpretation of Deep Research](https://mp.weixin.qq.com/s/t_CAsHp5cnFQIKFbbQqkLg)
- [LLM Series (15): Interpretation of Transformer Position Encoding](https://mp.weixin.qq.com/s/y4rDTx0BTNFTamem6S_WKw)
- [LLM Series (16): Interpretation of Transformer Output Sampling](https://mp.weixin.qq.com/s/daR0asrVN01nFjFA2JcsJQ)
- [LLM Series (17): Interpretation of Transformer Residual Connection](https://mp.weixin.qq.com/s/GEwu__TklVjBN0o9cildpA)
- [LLM Series (18): Interpretation of Transformer Attention Mechanism](https://mp.weixin.qq.com/s/dttX6ODjnoyKfFfpyZGepQ)
## Video Series
- [How to Build Agents with Spring AI](https://www.youtube.com/watch?v=d7m6nJxfi0g)
- [Spring AI Series Video Tutorial](https://www.youtube.com/watch?v=yyvjT0v3lpY&list=PLZV0a2jwt22uoDm3LNDFvN6i2cAVU_HTH)
- [Mark's Technology Workshop](https://space.bilibili.com/1815948385) 🌟🌟🌟
- [Large Model Technology AI Community EZ-Encoder](https://space.bilibili.com/3546829121652889?spm_id_from=333.788.upinfo.detail.click) 🌟🌟🌟🌟🌟
## High-Quality Papers
- Model Paradigm and Core Algorithm
- [Brook for GPUs(2004)](https://graphics.stanford.edu/projects/brookgpu/)
- [ImageNet Classification with Deep CNNs(AlexNet)](https://proceedings.neurips.cc/paper_files/paper/2012/file/c399862d3b9d6b76c8436e924a68c45b-Paper.pdf)
- [Sequence to Sequence Learning with Neural Networks(2014)](https://arxiv.org/abs/1409.3215)
- [Neural Machine Translation by Jointly Learning to Align and Translate(2014)](https://arxiv.org/abs/1409.0473)
- [Distilling the Knowledge in a Neural Network(2015)](https://arxiv.org/abs/1503.02531)
- [Deep Residual Learning for Image Recognition(ResNet)(2015)](https://arxiv.org/abs/1512.03385)
- [Outrageously Large Neural Networks: Mixture of Experts(2017)](https://arxiv.org/abs/1701.06538)
- [Attention Is All You Need(Transformer)(2017)](https://arxiv.org/abs/1706.03762)
- [Mastering the Game of Go without Human Knowledge(AlphaGo Zero)(2017)](https://www.nature.com/articles/nature24270)
- [The Bitter Lesson(2018)](https://www.gwern.net/The-Bitter-Lesson)
- [Chain-of-Thought Prompting(2022)](https://arxiv.org/abs/2201.11903)
- [LoRA: Low-Rank Adaptation of LLMs(2021)](https://arxiv.org/abs/2106.09685)
- [ReAct: Reasoning and Acting in Language Models(2022)](https://arxiv.org/abs/2210.03629)
- Infra and Data
- [ZeRO: Memory Optimization for Trillion-Parameter Models (2019)](https://arxiv.org/abs/1910.02054)
- [Scaling Laws for Neural Language Models (2020) ](https://arxiv.org/abs/2001.08361)
- [Training Compute-Optimal LLMs (Chinchilla) (2022) ](https://arxiv.org/abs/2203.15556)
- [LAION-5B Dataset (2022) — Schuhmann](https://arxiv.org/abs/2210.08402)
- [The RefinedWeb Dataset (2023)](https://arxiv.org/abs/2306.01116)
- [MegaScale: Training on 10,000\+ GPUs (2024)](https://arxiv.org/abs/2402.15627)
- Language Model Development
- [Efficient Estimation of Word Representations(Word2Vec)(2013)](https://arxiv.org/abs/1301.3781)
- [Google’s Neural Machine Translation System(2016)](https://arxiv.org/abs/1609.08144)
- [Improving Language Understanding by Generative Pre-Training(GPT-1)](https://cdn.openai.com/research-covers/language-unsupervised/language_understanding_paper.pdf)
- [BERT: Pre-training of Deep Bidirectional Transformers(2018)](https://arxiv.org/abs/1810.04805)
- [Language Models are Unsupervised Multitask Learners(GPT-2)(2019)](https://cdn.openai.com/better-language-models/language_models_are_unsupervised_multitask_learners.pdf)
- [GPT-3: Language Models are Few-Shot Learners(2020)](https://arxiv.org/abs/2005.14165)
- [Training Language Models with Human Feedback(InstructGPT)(2022)](https://arxiv.org/abs/2203.02155)
- [Tulu 3 Technical Report(2024)](https://arxiv.org/abs/2411.15124)
- DeepSeek
- [DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning](https://arxiv.org/abs/2501.12948)
- [DeepSeek-V3 Technical Report](https://arxiv.org/abs/2412.19437)
- [DeepSeek LLM: Scaling Open-Source Language Models with Longtermism](https://arxiv.org/abs/2401.02954)
- Kimi
- [Kimi k1.5: Scaling Reinforcement Learning with LLMs](https://arxiv.org/abs/2501.12599)
- [Kimi K2: Open Agentic Intelligence](https://arxiv.org/abs/2507.20534)
- Qwen
- [Qwen Technical Report](https://arxiv.org/abs/2309.16609)
- [Qwen2.5 Technical Report](https://arxiv.org/abs/2412.15115)
- [Qwen3 Technical Report](https://arxiv.org/abs/2505.09388)
If you have any good articles or resources, you are also welcome to submit PR or Issue to supplement and improve. Below are the development and contribution guidelines.
## 🔧 Development Guide (Code, Documentation)
First, we welcome all forms of contributions, including but not limited to **code, documentation, testing, code comments**, etc. But before submitting contributions, please follow the process:
### Contributing Code
1. **Fork Project**
As shown below, fork the repository to your personal repository

2. **Clone Your Personal Repository Code**
```bash
# Fork the project on GitHub
# Clone your forked repository
git clone https://github.com/your-username/spring-ai-summary.git
cd spring-ai-summary
```
3. **Create a Feature Branch**
```bash
# Create and switch to a new feature branch
git checkout -b feature/your-feature-name
```
4. **Development Specifications**
- Follow the project's code style and naming conventions
- Ensure that the code passes all tests (if any)
- Update relevant documentation
5. **Submit Code**
```bash
# Add modified files
git add .
# Commit code
git commit -m "feat: add new feature"
# Push to your forked repository
git push origin feature/your-feature-name
```
6. **Create a Pull Request**
- Create a Pull Request on GitHub
- Fill in the PR description, explaining the changes and reasons
- Wait for code review and merge
## 📝 Notes
1. **API Key Security**
- It is recommended to store API keys using environment variables to avoid leakage risks
- Do not hardcode keys in the code repository
- Regularly rotate keys to improve security
2. **Token Usage**
- Continuously monitor token consumption to avoid exceeding limits
- Set reasonable token limits to prevent abuse
- It is recommended to implement a caching mechanism to improve response speed and cost control
## 📄 License & Description
* 1. This project adopts the MIT license. See the [LICENSE](LICENSE) file for details. Additionally, this project is for learning and research purposes only and should not be used in production environments. Please comply with the relevant model usage terms and conditions when using it.
* 2. All code and documentation of this project are independently developed and maintained by [glmapper](https://github.com/glmapper). Everyone is welcome to provide opinions and suggestions. If it helps you, please give a Star to support it! If you have any questions or suggestions, please submit an Issue or PR on GitHub or contact me through [here](http://www.glmapper.com/about). I will further synchronize **related Spring AI technical articles** to this repository and my personal WeChat public account: **Lei Shu's Technical Blog**. Welcome to scan the QR code and follow.
<p align="center">
<img src="docs/statics/wx-gzh.png" alt="WeChat Public Account" width="200"/>
</p>
## 🙏 Acknowledgements
- [Spring AI](https://github.com/spring-projects/spring-ai) - Provides a powerful AI integration framework
- [OpenAI](https://openai.com) - Provides GPT series models
- [Tongyi Qianwen](https://qianwen.aliyun.com) - Provides Qwen series models
- [DouPak](https://www.volcengine.com/docs/82379) - Provides DouPak series models
- [Milvus](https://milvus.io) - Provides vector database support
This project is a completely open-source project, and its main purpose is to gather more high-quality Spring AI-related learning resources. Of course, **related learning resources mainly come from the network. If there is any infringement, please contact me to delete it!**; Here, I also appreciate all the contributors who participate in open-source contributions and all the friends who share technical knowledge in the technical community.
## Star History
[](https://www.star-history.com/#java-ai-tech/spring-ai-summary&Date)
Connection Info
You Might Also Like
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
markitdown
MarkItDown-MCP is a lightweight server for converting URIs to Markdown.
servers
Model Context Protocol Servers
servers
Model Context Protocol Servers
Time
A Model Context Protocol server for time and timezone conversions.
Filesystem
Node.js MCP Server for filesystem operations with dynamic access control.