Spring AI 2.0 GA: Native Java AI Development with Spring Boot 4 Integration
Spring AI 2.0 reaches GA, offering a production‑grade, Java‑first AI development path tightly integrated with Spring Boot 4.x, Spring Framework 7.0, and the Model Context Protocol, while introducing upgraded agent tooling, Jackson 3, JSpecify annotations, and streamlined provider SDKs.
On June 12, 2026 the Spring team announced Spring AI 2.0.0 as GA, positioning it for AI Engineering scenarios and aligning it deeply with Spring Boot 4.0/4.1 and Spring Framework 7.0 to give Java developers a native, production‑grade AI application path without needing Python.
Core Highlight 1 – Deep Spring Boot 4 Integration
Adopts Jackson 3 for enhanced JSON serialization.
Annotates the codebase with JSpecify null‑safety annotations to reduce NPEs and improve Kotlin experience.
Reworks the Options system: unified defaults, builder‑style construction, immutable objects, and clearer property keys.
Core Highlight 2 – Agent and Tool‑Calling Upgrade
ToolCallingAdvisor : automatically registered by ChatClient to handle tool‑call round‑trips uniformly.
ToolSearchToolCallingAdvisor : supports progressive tool disclosure, scaling to hundreds of tools.
StructuredOutputValidationAdvisor : auto‑self‑corrects when structured‑output validation fails. ChatClient becomes the primary user‑facing API, while ChatModel serves as a lower‑level building block.
Core Highlight 3 – Native MCP Support
Spring maintains the official MCP Java SDK and bundles MCP SDK 2.0.0 compliant with the 2025‑11‑25 MCP specification.
Annotation‑driven exposure of services via @McpTool, @McpResource, and @McpPrompt.
Uses Streamable HTTP as the default transport (replacing deprecated SSE).
Integrates with enterprise observability and security stacks such as Micrometer, OpenTelemetry, and OAuth 2.0.
Core Highlight 4 – Model Provider Consolidation & Community Collaboration
OpenAI, Anthropic, and Google GenAI each collapse multiple implementations into a single SDK.
Support added for Ollama, OCI Generative AI, Azure Cosmos DB, and other community‑maintained providers.
A CONTRIBUTING.md guide is provided for human and AI Agent contributions.
Quick‑Start
Include the Spring AI BOM in a Maven dependencyManagement section or use the Gradle platform syntax. The required runtime is Spring Boot 4.0.x or 4.1.x, and projects can also be generated via start.spring.io.
Upgrade Considerations
Moving from Spring AI 1.1.x to 2.0.0 introduces breaking changes; users should consult the Upgrade Notes, reference documentation, and release notes. Major changes include the Options API refactor, the new Advisor‑based tool‑calling architecture, migration to Jackson 3, and the integration of the MCP module.
Community Extensions
spring-ai-session : event‑sourced conversation memory with tool‑call context and LLM summary compression.
spring-ai-agent-utils : bundles Agent skills and utilities (file, shell, web) wrapped as Advisors.
spring-ai-community/mcp-security : provides OAuth 2.0 and API‑Key security for MCP scenarios.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
java1234
Former senior programmer at a Fortune Global 500 company, dedicated to sharing Java expertise. Visit Feng's site: Java Knowledge Sharing, www.java1234.com
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
