Skip to content

Conversation

@bedrin
Copy link

@bedrin bedrin commented Oct 31, 2025

This PR migrates Spring AI framework to Spring Boot 4.0.0.RC1
Depending on Spring AI release schedule and planning it should probably be targeted to 2.x dedicated branch (or dedicated 1.1.x branch should be created) since it will break compatibility with Spring Boot 3.5

  • Updated Spring Boot dependency to 4.0.0.RC1
  • Spring Framework 7 API compatibility (see below)
  • Migration to Spring Boot 4.x as per https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Migration-Guide
    • Adopt new modular design of starters
    • Use new Jackson 3.x API
    • Support Property Mapper API changes around null handling
    • Use Spring Framework Retry functionality instead of separate Spring Retry project
  • Updated Swagger codegen templates used by huggingface model to align with latest Spring Framework APIs
  • Update elasticsearch test container to 9.2.0
  • Added FailureDetectingExternalResource from old versions of testcontainers library to support gemfire-testcontainers
  • Other related dependencies updates:
    • TestContainers to 2.0.1
    • GemFire testcontainers to 2.3.3
    • opensearch-testcontainers to 4.0.0
    • Rest Assured to 5.5.6
    • swagger-codegen-maven-plugin to 3.0.75

Fixes GH-3379 (#3379)

Includes changes from #4681

Built on-top of #4771

  • Use only Spring Framework APIs available both in 6.x and 7.x branches
  • Add constructors without logic to *Api classes in models modules to simplify extensibility; effective final fields are marked as final
  • Kotlin 2.x support; use kotlin compiler version 2.2.21
  • Update MCP SDK to 0.15.0
  • Update MCP Annotations to 0.6.0

Future tasks:

@ilayaperumalg
Copy link
Member

ilayaperumalg commented Oct 31, 2025

Hi @bedrin, Thanks for the PR. But, we already have an existing draft PR #4681 from @paulbakker addressing the same. It would be nice to collaborate on a single PR to avoid duplicate efforts.

@bedrin
Copy link
Author

bedrin commented Oct 31, 2025

@ilayaperumalg thanks - I've missed it. I've merged #4681 into my branch, resolved conflicts and squashed everything as per contributing guidelines. Tests are green locally.

@paulbakker I've merged your branch into mine - we did almost the same :) but you also made an extra step with Spring Retry. The diff between our branches is shown here (after I've resolved conflicts): OncoSteps#1 . Appreciate your review

- Updated Spring Boot dependency to 4.0.0.RC1
- Spring Framework 7 API compatibility (see below)
- Migration to Spring Boot 4.x as per https://github.com/spring-projects/spring-boot/wiki/Spring-Boot-4.0-Migration-Guide :
  * Adopt new modular design of starters
  * Use new Jackson 3.x API
  * Support Property Mapper API changes around null handling
  * Migrated from Spring Retry to Spring Framework Retry functionality
- Updated Swagger codegen templates used by huggingface model to align with latest Spring Framework APIs
- Update elasticsearch test container to 9.2.0
- Added `FailureDetectingExternalResource` from old versions of `testcontainers` library to support `gemfire-testcontainers`
- Other related dependencies updates:
  * TestContainers to 2.0.1
  * GemFire testcontainers to 2.3.3
  * opensearch-testcontainers to 4.0.0
  * Rest Assured to 5.5.6
  * swagger-codegen-maven-plugin to 3.0.75

Fixes spring-projectsGH-3379 (spring-projects#3379)

Includes changes by @paulbakker from spring-projects#4681

Built on-top of spring-projects#4771
- Use only Spring Framework APIs available both in 6.x and 7.x branches
- Add constructors without logic to `*Api` classes in `models` modules to simplify extensibility; effective final fields are marked as final
- Kotlin 2.x support; use kotlin compiler version 2.2.21
- Update MCP SDK to 0.15.0
- Update MCP Annotations to 0.6.0

Future tasks:
- [x] Raise issue to migrate from Spring Retry to Spring Framework 7 built-in retry functionality: spring-projects#4681
- [ ] Raise issue with `swagger-codegen-maven-plugin` to support Spring Framework 7
- [x] Raise issue with GemFire to support testcontainers 2.x: gemfire/gemfire-testcontainers#7

Signed-off-by: Dmitry Bedrin <[email protected]>
@bedrin bedrin force-pushed the feature/spring-boot-4-support branch from bd3fd81 to 65d0ae6 Compare October 31, 2025 13:55
@paulbakker
Copy link
Contributor

Changes look ok, although it's kinda hard to review - so we mostly have to rely on the tests to pass.

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.

[EPIC] Spring Boot 4.0 compatability

3 participants