Skip to content

chore(deps): upgrade to Spring Boot 4.2.0 and Spring AI 2.1.0 - #286

Merged
epugh merged 1 commit into
apache:mainfrom
adityamparikh:chore/spring-boot-4.2-spring-ai-2.1
Nov 24, 2026
Merged

epugh merged 1 commit into
apache:mainfrom
adityamparikh:chore/spring-boot-4.2-spring-ai-2.1

Conversation

@adityamparikh

@adityamparikh adityamparikh commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Moves the build onto Spring Boot 4.2.0 and Spring AI 2.1.0.

 gradle/libs.versions.toml
-spring-boot = "4.1.1"
+spring-boot = "4.2.0"
-spring-ai = "2.0.1"
+spring-ai = "2.1.0"
-mcp-sdk = "2.0.1"                                  # pin + mcp-bom library removed
-opentelemetry-logback-appender = "2.28.1-alpha"
+opentelemetry-logback-appender = "2.34.0-alpha"

 build.gradle.kts › dependencyManagement.imports
-mavenBom("io.modelcontextprotocol.sdk:mcp-bom:2.0.1")
 mavenBom("org.springframework.ai:spring-ai-bom:…")

Two follow-on changes go with the bump:

  • MCP SDK pin dropped. mcp-bom 2.0.1 was declared ahead of spring-ai-bom to lift the SDK past what Spring AI 2.0.1 shipped. Spring AI 2.1.0 depends on SDK 2.2.0 itself, and under the plugin's "first declaration wins" rule the old pin would have held the SDK back at 2.0.1. Without the pin, mcp, mcp-core and mcp-json-jackson3 all resolve to 2.2.0.
  • OTel logback appender aligned with Boot's OpenTelemetry 1.68.0. Boot manages opentelemetry-api/sdk but not opentelemetry-api-incubator, which follows the appender. With 2.28.1-alpha the classpath mixes the new SDK with incubator 1.62.0-alpha, and every application context fails:
OpenTelemetrySdkAutoConfiguration.openTelemetrySdk
  OpenTelemetrySdkBuilder.build                      (sdk, Boot-managed)
    SdkConfigProvider.<init>
      DeclarativeConfigProperties.get                (api-incubator 1.62.0-alpha)
        → NoClassDefFoundError: io/opentelemetry/api/internal/ConfigUtil

2.34.0-alpha is built against opentelemetry-api:1.68.0 and brings opentelemetry-api-incubator:1.68.0-alpha. dev-docs/graalvm-native-image.md records the pairing and the error, and AGENTS.md records the new versions.

Evidence

  • ./gradlew build → 457 tests, 0 failures, 0 skipped, BUILD SUCCESSFUL.
  • ./gradlew nativeTest -Pnative → 301 tests successful, 0 failed, BUILD SUCCESSFUL (the 153 skipped are the Mockito-based tests marked @DisabledInNativeImage).
  • The bootJar ships spring-boot-4.2.0, spring-ai-mcp-2.1.0, mcp-core-2.2.0, opentelemetry-api-1.68.0, opentelemetry-api-incubator-1.68.0-alpha, and META-INF/sbom/application.cdx.json.

Merge Danger

Door: two-way

Reverting the version catalog and the BOM import restores 4.1.1 / 2.0.1. No data or config formats change.

Blast Radius: runtime-wide

Every distribution artifact (Jib JVM image, both native images) picks up the new Boot, Spring AI and MCP SDK. The native images are exercised by native.yml.

🤖 Generated with Claude Code

@adityamparikh
adityamparikh force-pushed the chore/spring-boot-4.2-spring-ai-2.1 branch 2 times, most recently from 4d05a67 to 3e0b525 Compare November 14, 2026 15:26
@adityamparikh
adityamparikh marked this pull request as draft November 16, 2026 21:04
adityamparikh pushed a commit to adityamparikh/solr-mcp that referenced this pull request Nov 20, 2026
@adityamparikh
adityamparikh force-pushed the chore/spring-boot-4.2-spring-ai-2.1 branch from ad5d357 to c604387 Compare November 20, 2026 23:03
@adityamparikh adityamparikh changed the title chore(deps): upgrade to Spring Boot 4.2.0-RC2 and Spring AI 2.1.0-RC2 chore(deps): upgrade to Spring Boot 4.2.0 and Spring AI 2.1.0 Nov 20, 2026
@adityamparikh
adityamparikh marked this pull request as ready for review November 20, 2026 23:07
- Spring Boot 4.1.1 -> 4.2.0, Spring AI 2.0.1 -> 2.1.0.
- Drop the mcp-bom 2.0.1 pin. Spring AI 2.1.0 depends on MCP SDK 2.2.0
  itself, and the pin, declared ahead of spring-ai-bom, would have held
  the SDK back at 2.0.1 under "first declaration wins".
- opentelemetry-logback-appender 2.28.1-alpha -> 2.34.0-alpha, the
  release built against Boot 4.2's OpenTelemetry 1.68.0. The old
  appender left opentelemetry-api-incubator at 1.62.0-alpha, which fails
  OpenTelemetrySdk creation with NoClassDefFoundError:
  io/opentelemetry/api/internal/ConfigUtil.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Aditya Parikh <aditya.m.parikh@gmail.com>
@adityamparikh
adityamparikh force-pushed the chore/spring-boot-4.2-spring-ai-2.1 branch from c604387 to d3f3e79 Compare November 20, 2026 23:24
@sonarqubecloud

Copy link
Copy Markdown

@epugh
epugh merged commit 97998d6 into apache:main Nov 24, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants