Scrivio Interview library
DesignAdvanced6 min read · updated 12 November 2026

How would you build tooling to tell each team which deprecated Spring APIs and properties they use before a fleet-wide upgrade?

I would collect three kinds of evidence centrally and publish them per service: deprecation warnings from every build, the properties migrator's reports from staging environments, and an OpenRewrite dry run that lists the code changes the upgrade needs. A dashboard per service shows each team its own list, and shared libraries are fixed first, because one library can affect many services.

Why this question is asked

Before a fleet-wide upgrade, the hardest question is often not how to change the code but where the work is. With 100 or more services, nobody can read every codebase. Teams need to know, without guessing, which deprecated Spring APIs and properties they use, and leaders need to know how big the job is. Interviewers ask this design question to see whether we can build cheap, reliable tooling from what the ecosystem already provides. In this answer, we will design the collection of each kind of evidence, bring it together in one data model, publish a dashboard per service, and decide what to fix first.

1What We Need to Find

An upgrade breaks a service in three main ways. Java code calls an API that the new version removes; the compiler can find these as deprecation warnings today. Configuration uses property keys that the new version renamed or removed; only the runtime environment can see these, because configuration comes from files, environment variables and config servers. And some changes, such as moved packages or new required settings, are not marked as deprecations at all; an OpenRewrite upgrade recipe knows about many of these.

So the tooling has three collectors, one per kind of evidence, feeding one central store. The diagram shows the pipeline.

Step throughDeprecation tooling for a fleet
  1. Per-service dashboardone page per service, grouped by team
  2. Central storeservice, kind, item, location, fix
  3. Build collectorjavac warnings from every CI build
  4. Runtime collectorproperties migrator reports from staging
  5. Recipe collectorOpenRewrite dry run results per repository

5 layers, from the top down. Step through them one at a time.

Three independent collectors write to one store; the dashboard reads only from the store.

2Collector 1: Deprecation Warnings From Builds

Every CI build compiles with -Xlint:deprecation and -Xlint:removal. A small step after compilation parses the warnings into records: service, module, file, line, deprecated type or method, and whether it is marked for removal. The step sends the records to the central store with the commit and build time.

Because this runs on every build, the data is always current, and it costs a few seconds. To cover libraries as well, the same step runs in the builds of our shared libraries and starters, tagged as libraries rather than services.

Java
// One record from the build collector
{"service": "orders", "kind": "api", "item": "org.springframework.boot.test.mock.mockito.MockBean",
"removal": true, "location": "src/test/java/.../OrderServiceTest.java:18", "build": "2026-11-03T10:12Z"}

3Collector 2: Properties Migrator Reports From Staging

For configuration, we run each service once in each staging environment with spring-boot-properties-migrator of the target Boot version on the classpath. A tidy way to do this is a special build of each service, made by the platform pipeline, that adds the migrator as a runtime dependency without changing the team's own build file.

At startup the migrator walks every property source, including mounted ConfigMaps, environment variables and the config server, and logs each renamed or unsupported key with its source. Our collector reads those log lines, for example through the logging platform's search API, and turns them into records of kind property. Because the migrator only sees profiles and sources that were loaded, we also run a text search of configuration repositories for the old keys and record those hits the same way.

4Collector 3: OpenRewrite in Dry-Run Mode

OpenRewrite's upgrade recipes, for example the recipe that migrates to a given Boot version, describe the mechanical changes the upgrade needs. Running them in dry-run mode changes nothing; it writes a patch file and a data table of which recipe changed which file. Our pipeline runs the dry run on each repository every night or every week and records the number of changes per recipe.

This gives two useful facts per service. The size of the change tells teams and leaders how much the recipe will do for them. And the files the recipe cannot handle, such as calls with no automated replacement, are the real manual work, which is what we want to plan.

Shell
mvn -U org.openrewrite.maven:rewrite-maven-plugin:dryRun \
-Drewrite.recipeArtifactCoordinates=org.openrewrite.recipe:rewrite-spring:RELEASE \
-Drewrite.activeRecipes=org.openrewrite.java.spring.boot4.UpgradeSpringBoot_4_0
# target/rewrite/rewrite.patch 37 files would change
# check the recipe catalogue for the exact recipe name for your target version

5Publishing a Dashboard per Service

The dashboard reads from the central store and shows one page per service, owned by its team. At the top is a short summary: target version readiness, counts per kind, and how many items a recipe will fix automatically. Below it is the list of items with locations and the replacement from the Javadoc or migration guide, so a developer can start fixing without searching.

A fleet view sums the same data for leadership: total items, trend over time and the services or libraries with the most work. It also shows dependencies, so a service team can see that half of its items come from a shared starter it cannot fix itself.

One service's page on the dashboard
KindItemWhereFix
api (removal)@MockBean42 test filesrecipe: @MockitoBean
apideprecated builder methodPaymentConfig.java:31manual, see Javadoc
propertyspring.redis.hostconfig server orders-prod.ymlspring.data.redis.host
libraryacme-security-starter 2.1pom.xmlwait for platform 3.0
The library row is not the team's to fix, so the dashboard links it to the platform team's work.

6Fixing Shared Libraries First

The store makes one thing obvious: the same deprecated call often appears in dozens of services because it lives in a shared library or starter. A deprecated API inside the company's security starter shows up in every service that uses it, and no service team can fix it. So the platform team takes the libraries with the most dependent services first, releases fixed versions, and the items vanish from many service pages at once when the platform BOM moves.

Only after that do we ask service teams to fix their own items, which keeps their work small and avoids asking a team to fix something that disappears a week later.

7Follow-up questions

How do you keep the data current without slowing builds?

The build collector adds a few seconds, because the compiler already produces the warnings; we only parse them. The migrator runs once per staging deployment, and the OpenRewrite dry runs run nightly or weekly in a separate pipeline, not in developer builds.

Would you open pull requests automatically instead of only reporting?

For changes a recipe handles fully, yes, as one pull request per repository that the tests must pass. For manual items, reporting is better, because the team knows the code and decides how to fix it.

How do you get teams to use the dashboard?

Keep it accurate and short, link each item to its fix, and make readiness part of the normal service health review. When teams see that the list matches reality and shrinks after recipes run, they use it.

8Conclusion

In this answer, we designed tooling that tells each team which deprecated Spring APIs and properties it uses. Builds collect compiler deprecation warnings, staging runs collect properties migrator reports and a search covers unloaded configuration, and OpenRewrite dry runs list the required code changes. A central store feeds one dashboard page per service and a fleet view, and shared libraries are fixed first because they affect many services at once.

What to say in the interviewAbout 80 seconds aloud

Open with

I would build it from three collectors that feed one central store. The first is the build: every CI build compiles with -Xlint:deprecation and -Xlint:removal, and a small step parses the warnings into records with service, file, line, API and whether it is marked for removal.

Then, if they want more

The second is runtime configuration: the platform pipeline deploys a special build of each service with the target version's properties migrator into each staging environment, and we collect its renamed and unsupported key reports from the logs, because only the runtime sees ConfigMaps, environment variables and the config server.

I add a search of config repositories for old keys, since the migrator only sees loaded profiles. The third is OpenRewrite: the Boot upgrade recipe in dry-run mode, nightly or weekly, records how many changes the recipe will make and what is left for humans.

Then a dashboard shows one page per service with each item, its location and its fix, plus a fleet view for leadership. Finally, the data shows which items come from shared libraries and starters, and the platform team fixes those first, because one fixed library clears the same item from dozens of services.

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 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 build tooling to tell each team which deprecated Spring APIs and...": https://scrivio-interview-library.netlify.app/spring-boot/boot-migrations/d0aaec1b0d/