Spring AI brings LLM calls into ordinary Spring Boot code, and the hard parts show up at runtime: streaming to slow clients, context that drifts between calls, and token costs nobody planned for. These guides cover hands-on setup and the production pitfalls we hit.
All articles on this page are also collected in a Medium list you can save and follow.
Start here
- Spring AI Streaming Breaks Under Slow Clients — streaming responses to slow clients
- Spring AI Advisors Failed When Context Drifted — advisors and context drift
- Create an Ollama on Docker and Connect with Spring AI — running a local model for Spring AI
Production pitfalls
- Spring AI Streaming Breaks Under Slow Clients — streaming and slow clients
- Spring AI Metadata Breaks When Context Drifts — traceable chat metadata
- Spring AI Advisors Failed When Context Drifted — advisors and context drift
- Spring AI Multimodal Apps Failed at Runtime Boundaries — multimodal runtime boundaries
- Spring AI Broke Our Cost Assumptions Quietly — token cost assumptions
- Spring AI Gemini Failed Without Guardrails — guardrails with Google Gemini
Hands-on tutorials
- Create an Ollama on Docker and Connect with Spring AI — Ollama in Docker connected to Spring AI
- Tutorial: Using Function Calling with Spring AI — function calling
- AI for Text Summarization with Spring AI in Java — text summarization
- Spring AI for Sentiment Analysis: Transforming Text into Insights — sentiment analysis
- Transforming Data with Spring AI: A Java Tutorial — structured data transformation
Perspective
- Spring AI Is Changing How Java Developers Think — what changes for Java developers
- Spring AI Changes How Engineering Teams Work — what changes for engineering teams
Frequently asked questions
What are Spring AI advisors?
Advisors intercept ChatClient requests and responses, so you can add conversation memory, retrieved context, logging or guardrails without changing every call site. See Spring AI Advisors Failed When Context Drifted.
How do you stream Spring AI responses in Spring Boot?
ChatClient’s stream() returns a reactive Flux that you can expose as Server-Sent Events. Plan for clients that read slowly or disconnect, so the server does not keep generating tokens nobody receives.
Can Spring AI use a local model?
Yes. Spring AI supports Ollama, so you can run an open model locally in Docker and call it through the same ChatClient API.
New articles are published on Medium first. Subscribe to the newsletter to get production lessons by email.