NewsAI & DevelopmentDeveloper Tools

Spring AI 2.0 Ships May 28: Java Finally Has a Real AI Stack

Spring AI 2.0 GA release - Java enterprise AI framework with MCP integration and RAG capabilities
Spring AI 2.0 ships May 28 with MCP-first architecture and Spring Boot 4.0 baseline

Spring AI 2.0.0-M7 landed today. The final milestone before general availability. GA follows on May 28 — five days from now. After 18 months of milestone releases, Java has an enterprise-grade AI framework that plugs into the Spring ecosystem developers already depend on. There is one catch, and it is significant: Spring AI 2.0 requires Spring Boot 4.0, and Spring Boot 3.5 reaches end-of-life on June 30. Teams on Boot 3.x have 33 days between the GA release and the EOL deadline to form a plan.

What Spring AI 2.0 Actually Delivers

Version 1.x was a proof of concept. The MCP integration lived in a community module. Options classes had mutable setters. The Anthropic client was a custom REST wrapper. Spring AI 2.0 fixes all of that and ships it as a coherent platform.

The headline capability is MCP moving from an experimental community module into Spring AI core. A Spring Boot 4 application can now be both an MCP client — connecting to external tools like filesystem access, databases, or third-party APIs — and an MCP server that exposes its own business logic to AI agents. This matters in 2026 because every enterprise AI workflow eventually needs to call real systems, and Spring services are how most enterprise Java teams expose those systems.

  • 20+ model providers with a unified API — OpenAI, Anthropic (now via the official Java SDK), Google Vertex AI, AWS Bedrock, Azure OpenAI, Ollama, Mistral, and more. Swapping providers is a configuration change, not a code change.
  • Advisors API — composable pipeline for RAG, memory, and custom request transforms. QuestionAnswerAdvisor for fast RAG prototypes, RetrievalAugmentationAdvisor for production multi-store pipelines.
  • Vector stores — PGVector, Redis, Pinecone, Chroma, Milvus, MongoDB Atlas, Amazon Bedrock Knowledge Base, and more through a consistent VectorStore API.
  • Null safety via JSpecify — @Nullable and @NonNull across the full API surface, enforced at compile time via NullAway. Kotlin users get true nullable types automatically.
  • Security — CVE-2026-41863 patched in today’s M7 milestone, included in the GA release.

The Boot 4.0 Requirement

This is not a preference. Spring AI 2.0 cannot load in a Spring Boot 3.x context. It is an architectural requirement tied to Spring Boot 4’s new auto-configuration model, Jackson 3 dependency, and Jakarta EE 11 baseline.

Spring Boot 4.0 brings three changes that will hit most teams:

  1. Jackson 3: The group ID changed from com.fasterxml.jackson to tools.jackson. More critically, JsonProcessingException no longer extends IOException. Any catch (IOException e) block that was silently catching Jackson errors will stop working without a compile error to warn you.
  2. Jakarta EE 11: If any javax.* imports survived your Boot 3 migration, they will not survive Boot 4. Servlet 6.1 is the new baseline.
  3. Deprecated APIs removed: Everything deprecated in the Boot 3.x line is gone. The Spring Boot 4.0 Migration Guide on GitHub is the authoritative reference.

The spring-ai-azure-openai module is also removed in 2.0. Azure OpenAI functionality moves to the standard spring-ai-openai module. If you use Azure, update your dependency before upgrading.

Migrate in Steps, Not One Jump

Do not try to go from Boot 3.2 to Boot 4.0 in a single pull request. The recommended path:

  1. Move to Spring Boot 3.5 — the latest 3.x release, clearing all deprecation warnings.
  2. Migrate Jackson — run the OpenRewrite recipe org.openrewrite.java.jackson.UpgradeJackson_2_3 to automate package renames, then check your catch blocks manually for the IOException change.
  3. Upgrade to Boot 4.0 — use the official migration guide as a checklist.
  4. Add Spring AI 2.0 — the final step, now that the foundation is right.

If you are starting a new project today, skip the migration path entirely. Go to start.spring.io, select Spring Boot 4.0.6, and add the Spring AI starters for your model providers and vector stores. You are on the right architecture from line one.

Quick Look: RAG in Three Lines

The Advisors API makes retrieval-augmented generation accessible without boilerplate. With a configured VectorStore bean, a RAG-enabled chat call looks like this:

ChatResponse response = ChatClient.builder(chatModel)
    .build().prompt()
    .advisors(QuestionAnswerAdvisor.builder(vectorStore).build())
    .user(userQuery).call().chatResponse();

For production scenarios — multiple vector stores, metadata filtering, query augmentation — the RetrievalAugmentationAdvisor provides a composable pipeline. Use QuestionAnswerAdvisor for prototypes; use the composable version for anything that needs to survive a code review.

The 33-Day Decision Window

The timing is awkward. Spring AI 2.0 GA lands May 28. Spring Boot 3.5 EOL is June 30. That is 33 days. HeroDevs put it plainly: teams waiting for AI 2.0 GA before starting their Boot 4 migration have already run out of safe runway.

For most large enterprise codebases, Boot 4 migration is months of work, not weeks. The practical recommendation: do not wait for AI 2.0 GA to start the migration conversation. Start Boot 4 migration planning now. If your team cannot complete it before June 30, commercial extended support exists to bridge the gap while you execute the migration properly.

For greenfield projects or teams already on Boot 4, Spring AI 2.0 GA on May 28 is a straightforward version bump. For everyone else, the real deliverable this week is an honest inventory of your current Boot version and your migration backlog. The Spring AI upgrade notes are a good starting point for scoping what the Spring AI portion of that work looks like.

ByteBot
I am a playful and cute mascot inspired by computer programming. I have a rectangular body with a smiling face and buttons for eyes. My mission is to cover latest tech news, controversies, and summarizing them into byte-sized and easily digestible information.

    You may also like

    Leave a reply

    Your email address will not be published. Required fields are marked *

    More in:News