Quick revision
The short answer
I would compare the cost of each Spring migration with the cost of rewriting on another framework, which is almost always much higher, and weigh in staff skills, the ecosystem and long-term support. Spring migrations are well documented and supported by tools, so they are a known, bounded cost. To keep the choice open, I would keep domain logic separate from the framework, and I would review the decision every year or two without switching for short-term trends.
What to remember
In this answer, we saw that a Spring major migration is a bounded, well-tooled cost, while switching frameworks is a rewrite that typically costs many times more and still leaves us with future majors. Skills, ecosystem and long-term support usually favour staying. We reduce lock-in by keeping domain logic free of framework code, and we review the choice on a fixed rhythm, switching only specific workloads and only for lasting, measured reasons.
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 compare the cost of each Spring migration with the cost of rewriting on another framework, which is almost always much higher, and weigh in staff skills, the ecosystem and long-term support. Spring migrations are well documented and supported by tools, so they are a known, bounded cost. To keep the choice open, I would keep domain logic separate from the framework, and I would review the decision every year or two without switching for short-term trends.
Why this question is asked
Every few years someone in a Java organisation asks whether the next big Spring migration is the moment to move to Quarkus, Micronaut, Helidon or another stack. It is a fair question, because majors such as Boot 3 and Boot 4 cost real time. Interviewers ask it of senior leaders to see whether we can make a framework decision with numbers and reasoning instead of enthusiasm or habit. In this answer, we will look at what a major migration really costs, compare it with the cost of a switch, go through the non-technical factors, see how to reduce lock-in either way, and finish with how often to revisit the decision.
1What a Spring Major Migration Really Costs
A major Spring release breaks compatibility on purpose. Boot 3 moved to Java 17 and renamed the javax packages to jakarta. Boot 4 moved to Spring Framework 7 and Jakarta EE 11, split its auto-configuration into modules and made Jackson 3 the default. For a typical service that is already on the latest minor with no deprecations, such a migration takes a few days to two weeks, most of it mechanical work done by OpenRewrite recipes, plus testing.
Let us put numbers on it for an organisation with 150 services. If the average migration costs five engineer days including testing, that is 750 engineer days, roughly three to four engineer years, spread over a year or two. That sounds large, but it happens once every three to five years, and much of it is shared through common libraries and recipes.
2Comparing It With a Rewrite on Another Framework
Moving to another framework is not a migration; it is a rewrite of every place where our code touches the framework: dependency injection, web layer, data access, security, configuration, testing and operations tooling. Even with similar concepts, each service needs a careful port, new tests and a production rollout, and the team must learn new failure modes while doing it. A realistic estimate is weeks to months per service, so for 150 services it is ten to fifty times the cost of a Spring major.
And the new framework also has majors. Quarkus, Micronaut and every other framework release breaking versions too, and they depend on the same Jakarta and Java platforms. So switching does not remove the migration problem; it pays a large one-time cost and then joins a different upgrade cycle.
| Factor | Spring major migration | Switch to another framework |
|---|---|---|
| Cost for 150 services | about 750 engineer days, often less | 10 to 50 times more |
| Tooling | official guide, OpenRewrite recipes | mostly manual porting |
| Risk | known changes, release notes | new failure modes everywhere |
| Skills | existing staff, large hiring pool | retraining, smaller pool |
| Future majors | still needed | still needed, on another cycle |
3Skills, Ecosystem and Long-Term Support
The non-technical factors usually point the same way. Spring is the most widely used Java framework, so hiring and onboarding are easier, and most engineers arrive already knowing it. Its ecosystem covers almost every integration we need: data stores, messaging, security, cloud platforms and observability. And it has a published support policy, open source support for each minor plus optional commercial support for longer periods, which lets us plan.
That does not mean Spring is always right. A team building very small, fast-starting functions might find a framework built for native images a better fit, and that is a reason to use it for that workload. The decision can be made per use case rather than for the whole estate. What I would avoid is a full switch justified only by the pain of one migration.
4Keeping the Choice Open
Whatever we choose, the cost of any future change depends on how much of our code is framework code. So I would keep domain logic, the business rules and calculations, in plain Java classes that do not import Spring types, and keep framework code in thin adapters: controllers, repositories, message listeners and configuration. This makes Spring majors cheaper, because fewer files touch the changing APIs, and it makes a future switch possible for a subset of services if it ever makes sense.
Notice that this is the same advice that reduces migration cost within Spring. Good separation pays off whether we stay or leave, which is why I would invest in it regardless of the decision.
- Framework adapterscontrollers, listeners, repositories, config
- Application servicesuse cases, thin, few framework types
- Domain modelplain Java, no framework imports
- Tests of the domainplain JUnit, no Spring context
4 layers, from the top down. Step through them one at a time.
5Reviewing the Decision Without Chasing Trends
I would review the framework choice on a fixed rhythm, every year or two, as part of the architecture review, and write down the result. The review asks concrete questions. Has the cost of Spring upgrades grown? Has Spring's support or licensing changed? Do we have workloads where another framework gives a measurable gain, for example in startup time or memory per instance? Are we struggling to hire?
What I would not do is switch because a framework is popular at conferences this year or because a benchmark looks good. A switch costs years of engineering time; it needs a reason that lasts as long as that. If the review finds a strong case for a specific workload, I would run a pilot on a few services, measure, and only then decide.
6Follow-up questions
When would you actually switch away from Spring?
If Spring's governance or licensing changed in a way that raised our costs or risk a lot, if support disappeared, or if a specific class of workloads gained a large, measured benefit from another framework, such as much lower memory for hundreds of small instances. Even then I would switch those workloads, not the whole estate at once.
How do you answer engineers who want to move to a newer framework?
I would ask them to make the case with numbers: what we gain, what the port costs, and how we would run both stacks during the transition. If the case is good, a pilot proves it. Often the exercise shows that the real pain is outdated versions or tangled code, which a switch would not fix.
Does keeping domain logic separate slow teams down?
Slightly at first, because it adds a mapping layer in places. But it makes tests faster, since domain tests need no Spring context, and it makes every framework upgrade touch fewer files. Over the life of a service it usually saves time.
7Conclusion
In this answer, we saw that a Spring major migration is a bounded, well-tooled cost, while switching frameworks is a rewrite that typically costs many times more and still leaves us with future majors. Skills, ecosystem and long-term support usually favour staying. We reduce lock-in by keeping domain logic free of framework code, and we review the choice on a fixed rhythm, switching only specific workloads and only for lasting, measured reasons.
Open with
I would decide with numbers. A Spring major such as Boot 3 or Boot 4 costs a few days to two weeks per service when services are current, and much of it is done by the official migration guide and OpenRewrite recipes.
Then, if they want more
For 150 services that is a few engineer years every three to five years. A switch to another framework is a rewrite of every framework touch point, injection, web, data, security, config and tests, which is weeks to months per service and many times the cost, and the new framework has its own majors too.
Then I add the non-technical factors: we can hire Spring engineers easily, the ecosystem covers our integrations, and there is a published support policy with commercial extensions. So my default is to keep betting on Spring, while using another framework for a specific workload if it shows a measured gain, for example very small, fast-starting services.
To keep the choice open either way, I keep domain logic in plain Java with the framework at the edges, which also makes Spring upgrades cheaper. And I review the decision every year or two against concrete questions, rather than switching because of a trend or one painful migration.
About this answer
- Last updated
- 12 November 2026
- Versions it names
- Jakarta EE 11, Java 17, Spring Framework 7
- 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 "Each Spring major release has required large migrations: Jakarta in Boot 3 and...": https://scrivio-interview-library.netlify.app/spring-boot/boot-migrations/563ddad189/