feat: Spring Boot 4 + Spring AI 2.0 upgrade#23
Open
adityamparikh wants to merge 1 commit into
Open
Conversation
Contributor
Author
|
Currently using Milestone version of Spring AI 2.0. Will make it ready for review once Spring AI 2.0 is GA. |
Contributor
|
Thanks for the update on this one... We will merge when we get an official Spring AI 2.0 release! |
3 tasks
epugh
pushed a commit
that referenced
this pull request
Mar 9, 2026
* feat: implement observability with OpenTelemetry and Micrometer, add logging configuration, and enable tracing with annotation support * test(observability): implement distributed tracing tests for Spring Boot 3.5 Add comprehensive distributed tracing test suite using SimpleTracer from micrometer-tracing-test library. This is the Spring Boot 3-native approach for testing observability without requiring external infrastructure. Key changes: - Add DistributedTracingTest with 6 passing tests for @observed methods - Add OpenTelemetryTestConfiguration providing SimpleTracer as @primary bean - Add OtlpExportIntegrationTest (disabled due to Jetty dependency issue) - Add LgtmAssertions and TraceAssertions utility classes - Add micrometer-tracing-bridge-otel to bridge Observation API to OpenTelemetry - Add spring-boot-starter-aop for @observed annotation support - Add test dependencies: micrometer-tracing-test, awaitility, Jetty modules Test results: - DistributedTracingTest: 6/6 tests passing - Spans successfully captured from @observed annotations - Build: SUCCESS (219 tests passing, 0 failures) Spring Boot 3.5 uses Micrometer Observation → Micrometer Tracing → OpenTelemetry bridge, which differs from Spring Boot 4's direct OpenTelemetry integration. Adapted from PR #23 (Spring Boot 4 implementation) with modifications for Spring Boot 3.5 architecture and APIs. --------- Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
Contributor
Author
|
Re-triggering CI now that ci.yml has landed on main (#117). |
Contributor
|
Looks like you have some conflicts.. I think you need to update from main to pick up the new ci stuff? |
6bc312d to
6427366
Compare
9bbfae5 to
857fa32
Compare
Migrate the Solr MCP server from Spring Boot 3.5.x / Spring AI 1.1.x to Spring Boot 4.1.0 and Spring AI 2.0.0 GA. Highlights: - Jackson 3: tools.jackson.databind replaces com.fasterxml.jackson.databind (annotations stay in com.fasterxml.jackson.annotation); the MCP SDK uses the mcp-json-jackson3 module. JacksonException replaces IOException/ JsonProcessingException; JsonNode.properties()/asString() replace fields()/asText(). - MCP annotations: package moved from org.springaicommunity.mcp.annotation to org.springframework.ai.mcp.annotation (now part of Spring AI core). - Modular starters: spring-boot-starter-web -> -webmvc + -json; explicit spring-ai-autoconfigure-mcp-server-common (no longer pulled transitively after Spring AI 2.0.0-M7); modular test starters (actuator / opentelemetry / webmvc). - Observability: spring-boot-starter-opentelemetry (SB4 idiomatic) for traces, metrics, and OTLP log export, replacing the manual OTel BOM + micrometer-tracing-bridge-otel approach; spring-boot-starter-aspectj for @observed; OpenTelemetry logback appender installed programmatically via InstallOpenTelemetryAppender; management.opentelemetry.* OTLP properties. - Testcontainers 2.x module/package renames. - JSpecify is built into Spring Boot 4, so the explicit dependency is dropped. - GraalVM native: AOT NullAway exclusions for generated sources, JUnit-platform build-time init, DefaultMetaProvider + Solr API model reflection hints, and per-profile AOT documentation; dependency-resolution alignment for opentelemetry-proto and opentelemetry-api-incubator against the Spring Boot 4.1.0 BOM. Both Spring Boot 4.1.0 and Spring AI 2.0.0 are GA on Maven Central, so no milestone repositories are required. Scope is limited to the Spring Boot 4 / Spring AI 2.0 upgrade and its required changes; unrelated CI, Solr-version-matrix, and Solr 10 metrics changes are intentionally excluded. Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Upgrades the Solr MCP server to Spring Boot 4.1.0 and Spring AI 2.0.0 GA.
This PR is scoped to the Spring Boot 4 / Spring AI 2.0 upgrade only. It is rebased onto the latest
mainas a single commit. Changes that had accumulated on thesb4branch but are unrelated to the upgrade (CI Solr-version-matrix tweaks, Solr 10/admin/metricstest skips, the docker-image-tag-suffix helper superseded by #139, and cosmetic refactors) have been intentionally excluded.Highlights
tools.jackson.databindreplacescom.fasterxml.jackson.databind(annotations stay incom.fasterxml.jackson.annotation); the MCP SDK usesmcp-json-jackson3.JacksonExceptionreplacesIOException/JsonProcessingException;JsonNode.properties()/asString()replacefields()/asText().org.springaicommunity.mcp.annotation→org.springframework.ai.mcp.annotation(now part of Spring AI core).spring-boot-starter-web→-webmvc+-json; explicitspring-ai-autoconfigure-mcp-server-common(no longer transitive after Spring AI 2.0.0-M7); modular test starters.spring-boot-starter-opentelemetry(SB4 idiomatic) for traces, metrics, and OTLP log export, replacing the manual OTel BOM +micrometer-tracing-bridge-otelapproach;spring-boot-starter-aspectjfor@Observed; OTel logback appender installed programmatically viaInstallOpenTelemetryAppender;management.opentelemetry.*OTLP properties.DefaultMetaProvider+ Solr API model reflection hints, per-profile AOT docs; dependency-resolution alignment foropentelemetry-protoandopentelemetry-api-incubatoragainst the SB 4.1.0 BOM.Both Spring Boot 4.1.0 and Spring AI 2.0.0 are GA on Maven Central, so no milestone repositories are required.
Verification
./gradlew build --refresh-dependenciespasses locally on JDK 25: 346 tests, 0 failures, 0 errors (7 skipped), including the Testcontainers integration tests against real Solr.References
🤖 Generated with Claude Code