qifan777/dive-into-spring-ai

《动手学SpringAI》包含SSE流/Agent智能体/知识图谱RAG/FunctionCall/历史消息/图片生成/图片理解/Embedding/VectorDatabase/RAG

What it solves

This project is a teaching resource for developers who want to learn Spring AI in a practical way. Instead of just reading documentation, it bundles a full working example that shows how to implement common AI features like streaming responses, autonomous agents, function calling, embeddings, vector databases, retrieval-augmented generation (RAG), graph-based RAG, chat history, and image generation/understanding. It solves the problem of "where do I start and how do all these pieces fit together" by providing a runnable codebase with configuration and a frontend.

How it works

The project is split into a backend (Java 17, Spring AI) and a frontend (Node.js 18+, npm). The backend connects to several services:

  • DashScope API (or any OpenAI-compatible model) for the AI model calls.
  • MySQL for relational data.
  • Redis-Stack (with vector support) for vector storage and retrieval.
  • Neo4j (graph database) for graph-based RAG.

You clone the repository, edit application.yml to set your API keys and database credentials, then run the backend (ServerApplication.java) and the frontend (using npm run api and npm run dev). The project includes a front-end UI so you can interact with the AI features visually. It also supports alternative OpenAI-protocol models by pointing to a relay service.

Who it’s for

This is aimed at Java developers who already know the basics of Spring Boot and want to add AI capabilities. It’s also useful for learners who prefer a concrete project over theoretical guides. The README is in Chinese, so it’s best suited for Chinese-speaking developers. The author also offers paid remote setup help, indicating it targets people who may need assistance with configuration.

Highlights

  • Covers a wide range of Spring AI topics: SSE streaming, agents, function calling, embeddings, vector databases, RAG, graph RAG, chat history, image generation, and image understanding.
  • Includes a frontend web UI to see results in action.
  • Provides Docker commands for Redis-Stack and Neo4j to get the infrastructure running quickly.
  • Works with DashScope or any OpenAI-compatible API, including a relay service with free credits.
  • Offers video and documentation links for further learning.

Related

  • Project
  • Project
  • Project
  • Project