beginner~2h
Chat Memory & Conversation Management
Module 01 established that LLMs are stateless. This module builds the illusion of memory on top — correctly, per-user, and without silently blowing your context window.
Learning objectives
- Beginner: In-memory MessageWindowChatMemory with a small maxMessages, fine for a single-session demo that doesn't need to survive a restart.
- Intermediate: JDBC-backed memory, conversation ID derived from the authenticated user, so real users get durable, isolated conversation history.
- Advanced: Combine bounded chat memory (recent context) with RAG (Module 09) for durable facts, so the system has both short-term conversational fluency and long-term recall without an ever-growing token bill.
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.
Chat Memory & Conversation Management