Skip to content

feat: Spring Boot 4 + Spring AI 2.0 upgrade#23

Draft
adityamparikh wants to merge 4 commits intoapache:mainfrom
adityamparikh:sb4
Draft

feat: Spring Boot 4 + Spring AI 2.0 upgrade#23
adityamparikh wants to merge 4 commits intoapache:mainfrom
adityamparikh:sb4

Conversation

@adityamparikh
Copy link
Copy Markdown
Contributor

@adityamparikh adityamparikh commented Dec 13, 2025

@adityamparikh adityamparikh marked this pull request as draft December 16, 2025 22:10
@adityamparikh
Copy link
Copy Markdown
Contributor Author

Currently using Milestone version of Spring AI 2.0. Will make it ready for review once Spring AI 2.0 is GA.

@epugh
Copy link
Copy Markdown
Contributor

epugh commented Jan 6, 2026

Thanks for the update on this one... We will merge when we get an official Spring AI 2.0 release!

@epugh epugh changed the title feat: Spring Boot 4 upgrade feat: Spring Boot 4 + Spring AI 2.0 upgrade Jan 6, 2026
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>
adityamparikh and others added 4 commits March 31, 2026 21:54
- Spring Boot 3.5.x → 4.0.5
- Spring AI 1.1.x → 2.0.0-M4
- Testcontainers 1.x → 2.0.2
- SolrJ 9.x → 10.0.0
- MCP Server Security 0.0.4 → 0.0.6
- Add milestone repository for Spring AI 2.x pre-releases
- Update build.gradle.kts for SB4 API changes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
- Migrate ObjectMapper → JsonMapper (Jackson 2 → 3)
- Update asText() → asString() for Jackson 3 JsonNode API
- Adapt HttpSecurityConfiguration for Spring Security 7
- Update CollectionService for SolrJ 10 /admin/metrics API
- Make JsonResponseParser a Spring Bean with injected JsonMapper
- Add CollectionUtils for SolrCloud validation

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
- Add InstallOpenTelemetryAppender for Logback OTel bridge
- Configure OTLP endpoints in application-http.properties
- Add LGTM (Loki/Grafana/Tempo/Mimir) stack to compose.yaml
- Add observability documentation and Grafana traces screenshot

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
- Migrate to Testcontainers 2.x API (testcontainers-junit-jupiter → testcontainers-solr)
- Update test configs for Jackson 3 JsonMapper
- Add InMemoryTracingTestConfiguration for OTel test support
- Update Docker integration tests for SB4 image

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: adityamparikh <aditya.m.parikh@gmail.com>
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