Quick revision
The short answer
I would move the custom argument resolvers, message converters and response advices into one shared, tested library instead of letting each service copy its own, require a stated reason and a review for any new extension point, and run that library's tests against new Spring versions early in CI. Extensions that duplicate features the framework added later get removed, and every remaining extension has written behaviour and a named owner.
What to remember
In this answer, we saw why framework extensions break on upgrades: they depend on details around the stable interfaces, and copying multiplies every fix. The controls are a shared, tested library for common extensions, a stated reason and review for new ones, CI that tests against new Spring versions early, regular removal of extensions the framework has made redundant, and a catalogue that records each extension's behaviour and owner, ideally checked by the build.
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 move the custom argument resolvers, message converters and response advices into one shared, tested library instead of letting each service copy its own, require a stated reason and a review for any new extension point, and run that library's tests against new Spring versions early in CI. Extensions that duplicate features the framework added later get removed, and every remaining extension has written behaviour and a named owner.
Why this question is asked
Framework extension points are powerful, and that is the problem. A custom argument resolver or response advice changes how every request in a service behaves, often invisibly, and it relies on framework details that can change between versions. When dozens of teams each write their own, upgrades turn into archaeology: which of these forty classes broke, and what were they for? Interviewers ask this to see whether we can keep the freedom extensions give while controlling their cost. In this answer, we will look at why extensions break on upgrades, then go through the controls we would put in place: a shared library, a review gate, early compatibility testing, pruning and ownership.
1Why Custom Extensions Break on Upgrades
An extension point such as HandlerMethodArgumentResolver, HttpMessageConverter or ResponseBodyAdvice is a public interface, so the method signatures are stable. What changes between versions is everything around them: the order in which resolvers are consulted, which converters are registered by default, which media types Jackson claims, how ProblemDetail errors are written, or which class names exist at all. For example, a major version can move to a new Jackson generation with different converter classes, and an advice that checks converterType against the old class silently stops applying.
The second reason is copying. When a useful resolver is pasted into twenty services, each copy drifts: one gets a bug fix, another gets a different header name. On upgrade day, each copy has to be found and fixed separately, and nobody knows which variant is the correct one. Most of the upgrade pain is not the framework change itself but the multiplication.
2Control 1: One Shared, Tested Library
The first move is to collect the extensions that more than one service uses into a shared library, ideally a Spring Boot starter that registers them through auto-configuration. Services stop copying code and depend on a version instead. When Spring changes, we fix the extension once, release a new version of the library, and services pick it up with a dependency bump.
The library has its own tests, written against a real web slice with MockMvc, that pin down the observable behaviour: which header is read, what status comes back on failure, which responses are wrapped and which are not. These tests are what make the next upgrade cheap, because they tell us exactly what broke.
3Control 2: A Reason and a Review for New Extension Points
Not every extension is a bad idea, but each one should exist on purpose. We ask teams that want a new resolver, converter or advice to write a short note: the problem, why existing framework features do not solve it, and what the extension changes for every request. A small group of experienced reviewers, the platform team or a web guild, reviews it. The review often ends with a simpler answer, such as a Jackson property or a @RequestHeader parameter, and the extension is never written.
If the extension is accepted and is generally useful, it goes into the shared library. If it is truly specific to one service, it stays there, but it is listed and owned like any other.
- Team describes the problemand why built-in features do not solve it
- Can a framework feature solve it?Yesuse the feature, no extensionNocontinue the review
- Useful to more than one service?Yesadd it to the shared libraryNokeep it in the service, listed
- Write behaviour testsweb slice tests of the observable behaviour
- Record behaviour and ownerin the extension catalogue
5 steps in order. Play them, or step through them one at a time.
4Control 3: Test Against New Spring Versions Early
We do not want to discover broken extensions in the week a team tries to upgrade. The shared library's CI runs its test suite against the current Spring Boot version and also against the next one as soon as milestones or release candidates are published. A failing build there is an early warning months before any service is affected.
Services can do the same cheaply: a scheduled CI job that builds against the next Boot version and runs the web tests. When it fails, the failure points at a specific extension and test, which is far easier to fix than a production incident after the upgrade.
5Control 4: Remove What the Framework Now Does
Frameworks catch up. Teams wrote custom error-response advices before Spring had ProblemDetail support, custom resolvers for things that later became standard annotations, and converters for formats Spring later supported. Each of these is now code that only duplicates the framework and adds risk.
So each Spring upgrade includes a short review of the extension catalogue against the release notes. If the framework now provides the feature, we migrate to it and delete the extension. Deleting code is the cheapest way to make the next upgrade easier, and it reduces the surprises new developers meet.
6Control 5: Document Behaviour and Owners
Every extension, shared or local, has an entry in a catalogue: what it does to requests and responses, which services use it, its order relative to other extensions and to Spring Security, and the team that owns it. When an upgrade breaks it, there is a person to call and a description to compare against.
A simple automated check helps keep the catalogue true. A build step or ArchUnit rule can list classes implementing the extension interfaces in each service and fail if one is not in the catalogue. That turns documentation from a hope into something the build enforces.
To make this concrete: if we start with 40 extensions across 25 services, a realistic first year might merge them into 10 shared ones, delete 15 that the framework now covers, and keep 15 local ones that are listed and owned. The next upgrade then touches ten tested classes in one library instead of forty untested copies.
7Follow-up questions
Would you ban custom extensions entirely?
No. Extensions exist because some problems really need them, such as a tenant resolver or a domain-specific converter. A ban would push teams towards worse workarounds, like logic copied into every controller. The goal is that each extension exists for a reason, is tested, and has an owner, not that there are none.
How do you persuade teams to give up their own copies?
By making the shared version easier to use than the copy: a starter that works with one dependency, good documentation, fast fixes, and a clear way to contribute changes. We also show the cost of the last upgrade in hours spent on copied extensions. Teams usually agree once the shared path is genuinely less work.
What do you do when a shared extension needs a breaking change?
Release it as a new major version of the library, keep the old behaviour behind a property for a transition period if possible, and write a short migration note. The library's version, not each service's code, then tells us which services still need to move.
8Conclusion
In this answer, we saw why framework extensions break on upgrades: they depend on details around the stable interfaces, and copying multiplies every fix. The controls are a shared, tested library for common extensions, a stated reason and review for new ones, CI that tests against new Spring versions early, regular removal of extensions the framework has made redundant, and a catalogue that records each extension's behaviour and owner, ideally checked by the build.
Open with
I'd first explain why this happens. The extension interfaces themselves are stable, but what's around them changes: resolver order, default converters, Jackson versions, how errors are written. And when a resolver has been copied into twenty services, every fix has to be made twenty times.
Then, if they want more
So my first step is a shared library, ideally a Boot starter, that holds the extensions more than one service uses, with real MockMvc tests of their observable behaviour. Services depend on a version instead of copying code. Second, new extension points need a short written reason and a review by the platform team or a guild.
Quite often the review finds that a Jackson property or a built-in annotation already does the job, and the extension never gets written. Third, the shared library's CI runs against the next Spring Boot version as soon as milestones appear, so breakage shows up months before a service upgrade, not on upgrade day.
Fourth, at every upgrade we compare the catalogue with the release notes and delete extensions the framework now covers, like old custom error advices that ProblemDetail replaced. Fifth, every extension has a documented behaviour and a named owner, and I'd add a build check that fails if a class implementing these interfaces isn't in the catalogue.
The aim isn't to ban extensions, it's that each one exists on purpose, is tested once, and has someone responsible for it.
About this answer
- Last updated
- 12 November 2026
- 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 Framework reference, Spring Web MVC
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 "Teams have added many custom argument resolvers, message converters and response...": https://scrivio-interview-library.netlify.app/spring-boot/mvc-architecture/a704f507b4/