1
0
Files
spring-ai-2-migration/.gitignore
Ankur 9ec32360ee Spring AI 1.x to 2.0 migration: breaking-change reference and offline verification suite
Companion code for the ankurm.com guide. Verified on Spring AI 2.0.0, Spring Boot 4.1.0,
JDK 25.0.3. run.txt is unedited mvn test output: 5 tests, 0 failures.

Runs with NO API key, no network and no provider account. A canned ChatModel returns fixed
responses; ChatClient, advisors and chat memory all sit above the model, so everything that
changed is still exercised faithfully. TestChatModel records each Prompt it receives, which
lets the tests assert what Spring AI SENT rather than what a model replied.

docs/01  complete breaking-change reference: platform (Boot 4 mandatory, Jackson 2 to 3),
         artifact renames (spring-ai-advisors-vector-store -> spring-ai-vector-store-advisor,
         spring-ai-core split, OCI and Minimax removals, MCP transports moved into Spring AI),
         options builders replacing setters, the dropped .options property prefix, tool
         calling (internalToolExecutionEnabled and toolNames removed outright, not renamed),
         chat memory, structured output schema changes, and a migration order that works.

Tested here
  - ChatMemory.DEFAULT_CONVERSATION_ID is gone; CONVERSATION_ID survives as the metadata KEY.
    The two look interchangeable and are opposites - swapping them to clear a compile error
    silently restores the shared-conversation bug the removal was meant to prevent.
  - PromptChatMemoryAdvisor is gone; MessageChatMemoryAdvisor replaces it, and the difference
    is not cosmetic (system-prompt text vs real Message objects, so token counts change).
  - Conversation id is now a per-request advisor param, provable by a test showing two
    conversations cannot see each other. In 1.x, omitting it put every user in one bucket.
2026-08-01 10:44:31 +05:30

131 B