[Spring Boot 4] Integrate Spring Data 4 migration and honour datastore migration blockers
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 30/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- java, spring, spring-boot
- Domain
- build-system, tooling
Research direction
Start by reading UpgradeSpringBoot_4_0, UpgradeSpringData_4_0, and the migration-readiness behavior from #1085. Run the existing Boot 4 migration tests, then add coverage for single-module, shared-parent or BOM, independently versioned, blocked, rerun, and idempotent scenarios. Done means datastore migrations run before Boot dependency changes, blockers remain visible, safe changes persist, and a later rerun completes the transition.
Written by the indexing model from the issue text.
Description
Related work
- #1080 introduced
UpgradeSpringData_4_0. - #1081 tracks Spring Data MongoDB 5 migration support.
- #1085 defines how removed Spring Data MongoDB JMX usage should be migrated while preserving compilability.
Problem
UpgradeSpringBoot_4_0 updates the Spring Boot parent/BOM/dependencies to 4.0, which selects the Spring Data 2025.1 release train. The current Boot 4 composite does not run UpgradeSpringData_4_0 before those dependency-management changes.
That leaves a sequencing gap: datastore-specific source migrations may need the source platform's type attribution and may identify source that requires manual remediation before the target datastore version is selected. A Boot parent/BOM change can otherwise bypass that focused migration decision. #1085 provides the first concrete case because Spring Data MongoDB 5 removes JMX APIs that existing source may still reference.
Proposed solution
- Run
UpgradeSpringData_4_0during the pre-Boot-4 migration phase, before Boot 4 dependency-management changes select the target Spring Data train. - Reuse explicit migration-readiness/blocker information from focused datastore recipes instead of duplicating datastore analysis in Boot-specific code.
- Use #1085 as the first integration: if its MongoDB JMX analysis finds unsupported source that still requires manual migration, keep the enclosing Boot platform change aligned with that result.
- Allow safe preparatory source migrations to run first.
- Preserve focused diagnostics at the exact source sites requiring manual work.
- After those sites are remediated, rerunning the recipe should continue the remaining Boot 4 migration idempotently.
Shared parent / BOM scope
Module-level analysis is not sufficient when a shared Maven parent, imported BOM, Gradle platform, or plugin controls versions for several modules.
For shared ownership, evaluate migration readiness across the modules affected by that shared platform change. A shared Boot 4 update should only proceed when the affected ownership scope is ready for the target datastore versions. Independently versioned modules may proceed separately where ownership can be established reliably.
Proposed implementation shape
The following is intended as orchestration guidance, not a prescription of exact recipe classes or internal APIs.
Prepare source for Boot 4
|
+-- run Spring Data 4 migration support
+-- apply safe datastore-specific source changes
`-- collect migration blockers
|
v
report blockers
|
v
Spring Boot 4 platform transition
|
only when safe
A likely shape is to:
- run datastore/source migrations before Boot 4 parent/BOM/dependency changes remove source-platform type attribution;
- reuse blocker/readiness information produced by focused datastore recipes rather than re-analysing datastore semantics in the Boot recipe;
- keep diagnostics independent of the final platform-transition guard so users still see the exact manual remediation sites when the Boot 4 transition is withheld;
- evaluate readiness at the ownership scope of the version change: module scope for independently versioned modules, and shared parent/BOM/platform scope where one change affects multiple modules;
- permit safe preparatory migrations to remain applied even when the final Boot 4 transition is blocked;
- allow a subsequent rerun to continue the remaining migration once blockers have been remediated.
#1085 should be the first concrete consumer of this pattern, but the orchestration should remain general enough for future datastore or platform migration blockers.
The exact mechanism for aggregating readiness, associating modules with dependency-management ownership, structuring declarative preconditions, or implementing project-aware scanning is intentionally left to the implementor.
Acceptance criteria
-
UpgradeSpringBoot_4_0runsUpgradeSpringData_4_0before Boot 4 dependency-management changes that select Spring Data 2025.1. - Datastore-specific analysis is reused rather than duplicated in the Boot recipe.
- #1085 migration readiness is respected when Boot 4 would indirectly select Spring Data MongoDB 5.
- Safe preparatory migrations can run before the Boot platform change.
- Shared-parent/BOM multi-module scenarios are evaluated across the affected ownership scope.
- Independently versioned modules can proceed independently where ownership is clear.
- After manual remediation, rerunning continues the remaining migration without duplicating prior changes.
- Existing Boot 4 migrations without datastore blockers continue normally.
- Tests cover single-module, shared-parent multi-module, independently versioned, blocked/readiness, rerun, and idempotent scenarios.
Out of scope
- Reimplementing MongoDB JMX analysis in the Boot recipe.
- Treating every diagnostic as a migration blocker.
- Deleting application-specific code solely to make the target platform compile.
- Solving every future Boot 4 migration blocker in this issue.
- Dominant language
- Java
- Stars
- 409
- Forks
- 160
- Avg merge
- 8h 37m
- Merged PRs (30d)
- 73
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from openrewrite/rewrite-spring
-
Recipe quality triage: remaining fixes, wiring and polish (A1–L4)Possibly taken @DavJaveiro claimed this 1 day ago. Opengood first issue
Difficulty 5/5 Over a week Newbie friendliness 35/100
openrewrite/rewrite-spring#1201 · 17 comments ·
Maintainers usually reply within 1 day
-
`UpgradeSpringBoot_3_4` keeps `htmlunit-driver` (HtmlUnit 2) and pins it to 4.13.0; MockMvc HtmlUnit tests then fail with `NoClassDefFoundError: org/htmlunit/WebConnection`May be free again @OnicarN claimed this 20 days ago, and no pull request is open. Open
Difficulty 3/5 1-2 days Newbie friendliness 58/100
openrewrite/rewrite-spring#1195 · 2 comments ·
Maintainers usually reply within 1 day
-
`ReplaceGlobalMethodSecurityWithMethodSecurity` swaps the annotation on a `GlobalMethodSecurityConfiguration` subclass, and the context fails to start: "EnableGlobalMethodSecurity is required"Possibly taken @theluckystrike claimed this 4 days ago. Open
Difficulty 3/5 1-2 days Newbie friendliness 68/100
openrewrite/rewrite-spring#1194 ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 67/100
openrewrite/rewrite-spring#1159 · 1 reaction ·
Maintainers usually reply within 1 day
-
Optimize the PreciseBeanType recipe and add type exclusion functionalityMay be free again @Akhil-1527 claimed this 46 days ago, and no pull request is open. Openenhancement
Difficulty 4/5 3-5 days Newbie friendliness 45/100
openrewrite/rewrite-spring#1148 · 3 comments ·
Maintainers usually reply within 1 day
All issues in openrewrite/rewrite-spring
Similar issues
-
Four TestConstraintBasedAlgorithm tests pass when nothing is thrownPossibly taken @sharanggupta claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
-
bug documentation good first issue help wanted priority low size XS
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
martin-francois/symphony-trello#1351 ·
Maintainers usually reply within 1 day
-
Add test coverage for ConvertUtil.parseDate() with NULL inputPossibly taken @mirajul-mollah7 claimed this today. Open
Difficulty 1/5 Under an hour Newbie friendliness 78/100
eclipse-sw360/sw360#4792 · 1 comment ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
aws/aws-emulator#30 · 1 comment ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 4 days