Quick revision
The short answer
I would make the later Boot 4 migration small by doing the preparation work now on Boot 3: keep all 100 services on the latest 3.5 and fix every deprecation, remove unmaintained libraries and those with no plan for Spring Framework 7 and Jackson 3, adopt JSpecify-friendly null handling and stop using internal Spring APIs, add tests for JSON contracts and configuration, and pilot Boot 4 on a few services early to find blockers.
What to remember
In this answer, we saw how to prepare 100 services for Boot 4 without migrating them: keep them on the latest 3.5 with zero deprecations, clean up libraries starting with shared starters, stop using internal Spring APIs and get ready for JSpecify null annotations, add JSON contract and configuration tests, and pilot Boot 4 early on representative services. Tracked on a dashboard, this turns the later migration into a short, mostly mechanical step.
Your turn
Answer it aloud as you would in the interview, or type your answer below. Then show one part at a time and compare.
I would make the later Boot 4 migration small by doing the preparation work now on Boot 3: keep all 100 services on the latest 3.5 and fix every deprecation, remove unmaintained libraries and those with no plan for Spring Framework 7 and Jackson 3, adopt JSpecify-friendly null handling and stop using internal Spring APIs, add tests for JSON contracts and configuration, and pilot Boot 4 on a few services early to find blockers.
Why this question is asked
Large organisations rarely move a whole fleet at once, and they rarely should. But the decision to wait does not have to mean doing nothing. Most of the cost of a major migration can be paid in advance, in small pieces, while the code still runs on the current version. Interviewers ask this design question to see whether we can turn that idea into a fleet-wide plan with clear rules and measurable progress. In this answer, we will look at why preparation is cheaper than migration, then go through each preparation step, and finish with how to organise and measure it across 100 services.
1Why Preparing Now Is Cheaper
A Spring major release removes what earlier minors deprecated and raises its baselines. For Boot 4 that means Spring Framework 7, Jakarta EE 11, modularised starters and auto-configuration, and Jackson 3 as the default JSON library. Every one of these has a part that can be done on Boot 3.5 today: deprecated APIs have replacements already, libraries can be upgraded or replaced, and tests can be written against the current behaviour.
The reason this saves money is that a change made while both the old and new APIs exist can be done one at a time, merged and released with the normal flow, with no long-lived migration branch. On migration day the remaining changes are few and mostly mechanical. Notice also that the preparation is useful even if Boot 4 were delayed: current versions, fewer abandoned libraries and better tests are good engineering on their own.
2Latest 3.5 and Zero Deprecations
The first rule for all 100 services is to be on the latest Boot 3.5 patch with no deprecation warnings from Spring APIs. Renovate or Dependabot can propose the patch upgrades automatically through a shared platform BOM. For deprecations, I would compile with -Xlint:deprecation and -Xlint:removal and report the count per service in CI, then fail the build only on new deprecations in changed code, so teams are not blocked by old debt while the count goes down.
A typical example is the test mock annotations: @MockBean and @SpyBean are deprecated in Boot 3.4 and later and removed in Boot 4, and @MockitoBean is the replacement. An OpenRewrite recipe can change all of them across the fleet in one automated pull request per repository.
3Clean Up Libraries
Libraries are the usual blockers in a major migration. I would build an inventory of every third party dependency across the fleet, from the dependency trees in CI, and classify each one. Libraries that Boot manages will move with Boot. Libraries outside the BOM need a check: do they have a release that supports Spring Framework 7 and, if they touch JSON, Jackson 3? Libraries with no release in two years or no stated plan are candidates for removal now.
Our own shared libraries and starters come first, because each one affects many services. The platform team should make them compatible with both Boot 3.5 and, as soon as milestones exist, Boot 4, so that services can move whenever they are ready.
| Library type | Example | Action now on Boot 3.5 |
|---|---|---|
| Managed by the Boot BOM | Hibernate, Micrometer | nothing; moves with Boot |
| Maintained, has a Boot 4 plan | a cloud SDK with a roadmap | keep current, track the date |
| Uses Jackson 2 directly | custom serializer modules | isolate it, plan the Jackson 3 port |
| Unmaintained or no plan | a library with no release since 2023 | replace or remove now |
| Our own shared starters | security, logging starters | make them ready first |
4Stop Using Internals and Prepare for Null Annotations
Code that uses Spring's internal classes, such as classes in packages marked internal or support types that were never meant for applications, breaks in majors without any deprecation warning. I would search for imports of such packages and replace them with public APIs. An ArchUnit rule, a test that checks the structure of our code, can keep them out afterwards.
Spring Framework 7 moves its null annotations to JSpecify, a common standard for marking what may be null. For Java code this mostly helps tools; for Kotlin code it changes the types the compiler sees, so a Kotlin service may get new compile errors where it treated a nullable return as non-null. Being explicit about null handling now, and trying a null checker such as NullAway on a few modules, makes that change uneventful.
5Test Contracts and Configuration
Some Boot 4 changes do not break compilation. Jackson 3 changes defaults and packages, so the JSON our APIs produce or accept may change. Renamed configuration properties fall back to defaults if nobody notices. So the tests that matter most are contract tests that compare real JSON bodies with stored examples, and tests that start the application with each environment's configuration and assert the important values.
I would ask every team to add these tests now, measured by a simple fleet rule, for example every public endpoint has at least one strict JSON contract test. They pass on Boot 3.5 today, and on migration day they show exactly what changed.
6Pilot Early and Measure
Finally, I would pick three or four pilot services that represent the fleet, for example one MVC service, one reactive service, one batch job and one that uses messaging, and try Boot 4 on them as soon as it is practical, without releasing. Each pilot produces a list of blockers and fixes, which goes into the shared starters, the recipes and a migration guide for the fleet.
Progress is tracked on a dashboard per service: Boot version, deprecation count, libraries without a Boot 4 plan, contract test coverage and pilot status. When the count of blockers is close to zero and the shared starters are ready, the decision to start the actual migration becomes easy, and each service's migration should take days rather than weeks.
- All services on latest 3.5Renovate with a platform BOM
- Deprecations reported in CIfail only on new ones in changed code
- Library inventory and clean-upshared starters first
- No internal APIs, explicit nullsArchUnit rule, JSpecify ready
- JSON contract and config testspass on 3.5 today
- Pilot Boot 4 on a few servicesblockers feed recipes and starters
- Blockers close to zero?YesStart the fleet migrationNoKeep preparing on 3.5
7 steps in order. Play them, or step through them one at a time.
7Follow-up questions
How long can services stay on Boot 3.5?
Until the end of its support. Each Boot minor has a fixed open source support period, and commercial support extends it. Check the support timeline on the Spring website and plan the migration window to finish well before open source support ends, leaving time for the slowest services.
Who does the preparation work, the platform team or the service teams?
Both. The platform team owns the BOM, shared starters, recipes, the dashboard and the pilots. Service teams own their own deprecations, libraries and tests, with a small fixed budget in their normal plans. Splitting it this way avoids a central team that does not know each service.
What would make you start the migration earlier than planned?
A security issue that is fixed only in Boot 4, a library we depend on dropping Boot 3 support, or the end of open source support for 3.5 coming closer. With the preparation done, starting earlier is a scheduling choice rather than a crisis.
8Conclusion
In this answer, we saw how to prepare 100 services for Boot 4 without migrating them: keep them on the latest 3.5 with zero deprecations, clean up libraries starting with shared starters, stop using internal Spring APIs and get ready for JSpecify null annotations, add JSON contract and configuration tests, and pilot Boot 4 early on representative services. Tracked on a dashboard, this turns the later migration into a short, mostly mechanical step.
Open with
I would treat preparation as fleet hygiene that pays for the migration in advance. First, every service is on the latest Boot 3.5 patch through a platform BOM and Renovate, and deprecation warnings are reported in CI, with builds failing only on new deprecations in changed code; OpenRewrite fixes common ones, such as @MockBean to @MockitoBean.
Then, if they want more
Second, a library inventory from the dependency trees: anything unmaintained, or with no plan for Spring Framework 7 and Jackson 3, gets replaced now, and our own shared starters are made ready first because each one blocks many services.
Third, no internal Spring APIs, enforced by an ArchUnit rule, and explicit null handling, because Framework 7 moves to JSpecify annotations, which especially affects Kotlin. Fourth, tests for what breaks silently: strict JSON contract tests, since Jackson 3 changes defaults and packages, and configuration tests per environment.
Fifth, pilot Boot 4 early on three or four representative services, feed what we learn into recipes and starters, and track everything on a per-service dashboard. When blockers are near zero, each service's actual migration should take days.
About this answer
- Last updated
- 12 November 2026
- Versions it names
- Spring Framework 7, Jakarta EE 11
- Checked
- Its structure and format are checked automatically. Use it as a carefully prepared study note: where a detail matters, confirm it against the documentation below. What the checks cover
- Where the question comes from
- Written by Scrivio for practice. It is not taken from an interview.
- Official documentation
- Spring Boot reference
Report an issue with this answer
Copy the line below and send it to the author with what you found. It carries the address of this page.
Issue with "How would you prepare 100 services on Boot 3.x for a later move to Boot 4 without...": https://scrivio-interview-library.netlify.app/spring-boot/boot-migrations/b1f50c133b/