
Get an overview of Spring AI, how it fits into the ecosystem, and how it compares with other AI frameworks. Learn the design principles, architecture, and why Spring AI is better than direct API integration.
Get IntelliJ IDEA Ultimate for free and follow this course using a professional development environment.
Redeem your 90-day access and get started quickly.
Configure your IDE, add Spring Boot with AI dependencies, and set up your OpenAI API key securely.
Walk through the essential tools and plugins to speed up your workflow.
Create a simple chatbot using Spring AI and understand the project structure. Learn best practices for ChatClient configuration and test your setup end-to-end.
Understand what makes a good prompt and the role of system, user, and assistant messages.
Learn simple optimization techniques and improve your chatbot with hands-on practice.
Explore the builder pattern of ChatClient.prompt() with single and multi-message approaches.
Practice different prompt patterns and know when to use each one effectively.
Simplify prompt management with reusable templates and dynamic variables.
Build a hands-on travel guide use-case using Spring AI’s prompt template features.
Move templates out of code into external files for better flexibility and maintainability.
See how to load templates at runtime and apply them in a real-world example.
Go beyond plain text and return responses in structured formats like JSON.
Learn with a travel guide example how to reliably parse and use AI-generated data.
Break complex tasks into multiple AI calls using chaining.
Hands-on demo: draft a travel plan, then refine it into structured JSON in two steps.
Understand what "memory" means in Large Language Models compared to stateless calls.
Learn why retaining context and history is crucial for realistic AI-driven conversations.
Set up ChatMemory in Spring AI to add default in-memory conversation tracking.
See how to inspect memory with a /memory endpoint and build a travel guide that remembers the last city.
Enable multi-turn conversations with unique conversation IDs.
Learn how to attach MessageChatMemoryAdvisor and run independent chats side by side.
Configure Spring AI with a JDBC-backed ChatMemoryStore.
Store and retrieve conversations in a database so your app remembers context across restarts.
Understand what function calling means in LLMs and why it matters for developers. See how Spring AI makes it simple to connect your AI with real data sources and tasks.
Build your first callable function with Spring AI. Learn how to register it and watch the AI select and execute the function instead of just generating text.
See how the AI extracts structured parameters from user prompts. Integrate the Weather API to return real-time weather data for any city and date.
Go beyond plain text by enforcing structured JSON responses. Learn how Spring AI validates outputs and delivers consistent, predictable results.
Discover how Spring AI handles multiple tools at once — from external APIs to database queries — and watch the AI intelligently pick the right function.
Learn how the AI can call one tool and pass its output into another. Build a CSV export tool and see function chaining in action with Contacts data.
Make your applications production-ready by handling failures safely. See how returning simple fallbacks lets the AI respond naturally without breaking.
Understand the core idea of RAG, why it’s needed, and preview the AtlasCorp Travel Policy document that we’ll query throughout this module.
Learn how to use PDFLoader and TokenTextSplitter to chunk PDF content and store it in a vector store, ready for semantic search.
Run real queries (hotels, budget, per-diem, emergency contacts) and see how Spring AI retrieves relevant text before generating an answer.
Move from an in-memory store to Redis for persistence. Understand why enterprises need durable storage and how Spring AI auto-configures Redis.
Extend your pipeline to handle multiple PDFs, including AtlasCorp Events & Holidays. Run queries that span across both documents seamlessly.
Get an overview of image-related features in Spring AI. Learn about captioning, generation, and transformation tasks, and how they fit into multimodal AI solutions.
Discover how to send images as input to ChatClient and generate captions programmatically. We’ll build a simple service and test it with sample images.
Learn how to generate images using OpenAI’s DALL·E model. Explore configuration options like resolution, quality, and output formats, then generate various themed images
Work with Stability.AI model to create images in various styles such as cinematic, photographic, or analog film. See how to configure and generate visually rich results for the same prompts.
This lesson introduces audio as a backend capability.
You’ll understand speech-to-text and text-to-speech as independent features and see how audio fits into an existing Spring AI backend before writing any code.
In this lesson, you’ll implement a simple audio upload API using multipart requests.
Uploaded audio files are stored temporarily on the server and prepared for further AI processing.
This lesson builds speech-to-text on top of the existing audio upload flow.
You’ll convert stored audio files into plain text using Spring AI and OpenAI Whisper.
Here, you’ll wire speech-to-text output into the existing chat pipeline.
The backend accepts voice input, converts it to text, and returns an AI-generated text response.
In this lesson, you’ll convert plain text into spoken audio using Spring AI.
The backend generates audio output directly from text, enabling voice responses.
This lesson brings everything together.
You’ll build a single API that accepts voice input and returns an AI-generated voice response by composing upload, STT, chat, and TTS.
Understand how the AI capabilities built so far are consumed by users, and what changes when moving from API calls to real browser-based interaction. This lesson sets the context for UI and streaming without introducing new code.
Build a minimal browser-based text chat UI that calls the existing chat API and displays AI responses. This establishes a baseline interaction where users wait for the full response before seeing any output.
Enable voice-based interaction by recording audio directly in the browser and sending it to the backend. Users receive both text and spoken AI responses, demonstrating audio AI consumption from a UI.
Explore the limitations of blocking AI responses from a user experience perspective. This lesson introduces streaming as a solution to improve responsiveness before implementing it.
Implement a streaming version of the chat API using Server-Sent Events (SSE).
AI responses are delivered incrementally, enabling real-time interaction without changing AI logic.
Consume the streaming chat API from the browser and update the UI as text arrives. This lesson demonstrates how streaming changes the feel of text-based AI interaction.
Bring together text chat, streaming chat, and audio chat in a single UI.
This final lesson consolidates the module and shows how one backend supports multiple interaction modes.
Learn about various Spring AI applications and patterns.
Mastering Spring AI with Java helps Java and Spring Boot developers build intelligent, AI-powered applications. This hands-on course takes you step by step from setting up your first Spring AI project to implementing advanced features like prompt engineering, memory, function calling, retrieval-augmented generation (RAG), Image Handling in AI (Image Captioning, Image generation), Audio Handling (Speech-to-Text, Text-to-Speech, Voice Based chat), and Streaming Chat APIs.
Includes free 90-day access to IntelliJ IDEA Ultimate for a professional development experience.
Includes professionally prepared subtitles in Spanish, Portuguese (Brazil), Japanese, and Chinese.
Spring AI enables developers to create context-aware applications that can handle complex tasks, maintain conversation history, interact with real-world data, and even process images. With practical examples and real demos, this course guides you through the essential tools and techniques needed to bring AI into your Spring Boot projects.
What you’ll learn:
Prompt Engineering: Craft effective prompts, use templates, and generate structured outputs.
Memory & Context: Build multi-turn conversations that remember user input and maintain continuity.
Function Calling: Integrate AI with real-world data and services, handle structured results, and manage errors.
Retrieval-Augmented Generation (RAG): Query documents, work with persistent vector stores, and handle multi-document knowledge.
Image Handling: Caption, generate, and style images to create multimodal AI applications.
Audio AI (Speech & Voice): Build voice-enabled AI backends with speech-to-text, audio-based chat, text-to-speech, and end-to-end voice → AI → voice workflows using Spring AI.
Chat UI & Streaming: Experience text, audio, and real-time streaming chat interactions powered by Spring AI backend APIs.
Production-Ready Practices: Learn best practices for building scalable and maintainable AI-powered applications.
By the end of this course, you’ll have practical skills to confidently integrate AI features into your Java and Spring Boot applications. Whether you want to build chatbots, knowledge assistants, or advanced AI-powered apps, this course gives you the tools and guidance to start building real-world AI applications today.