Scrivio Interview library
LeadershipPrincipal6 min read · updated 12 November 2026

Spring configuration moved from XML to Java configuration to Boot auto-configuration. What are the long-term costs of auto-configuration for a large organisation, and how do you manage them?

Auto-configuration removes boilerplate, but it hides what is configured and why, and an upgrade can change a default so that behaviour changes without any code change. Over years, that becomes a skills problem and an upgrade-risk problem. We manage it with internal starters that set company defaults in one place, upgrade notes per release, tests that assert the settings that matter, training in reading the condition report, and a rule that critical configuration is written explicitly even when Boot could infer it.

Why this question is asked

Every generation of Spring configuration solved the previous one's pain. XML was explicit but verbose, Java configuration was type-safe but still long, and Boot auto-configuration made a working service a few lines of code. For one team, that is pure gain. For an organisation with hundreds of services and many years of upgrades, the hidden part starts to cost money. Interviewers ask this at a senior level to see whether we can weigh a convenience against its long-term cost and set practices that keep the benefit. In this answer, we will look at what each style traded, the costs auto-configuration brings at scale with real examples, and the practices that manage them.

1What Each Style Traded

With XML configuration, every bean was listed in a file. Nothing was hidden, but files grew to thousands of lines and errors appeared only at runtime. Java configuration with @Configuration and @Bean moved the same explicitness into code, so the compiler checked types and refactoring tools worked. Both styles had the same property: what we did not write did not exist.

Boot auto-configuration reversed that property. Now what we do not write may still exist, because Boot creates a bean whenever its conditions match: a class on the classpath, a missing bean, a property. That is the source of its productivity and of its long-term cost.

How the configuration styles compare
StyleWhat is visibleMain long-term cost
XMLevery bean, in filessize, runtime-only errors
Java @Configurationevery bean, in codeboilerplate across services
Boot auto-configurationonly what we overridehidden defaults that change on upgrade
Auto-configuration is the first style where unwritten configuration still runs.

2Cost 1: Hidden Configuration

In a typical Boot service, a few hundred auto-configuration candidates are considered and dozens apply. The connection pool size, the Jackson date format, the HTTP client timeouts, the transaction manager and the error page are all decided by Boot unless someone overrides them. A developer reading the code sees none of it.

This matters during incidents. When a service runs out of database connections at 10 connections, the first question is where 10 came from. The answer, Hikari's default pool size, is not in our repository. Teams that do not know where to look lose time, and teams in a hurry sometimes override the wrong thing.

3Cost 2: Defaults That Change on Upgrade

Because defaults live in Boot, upgrading Boot can change behaviour without any change to our code. Spring Boot 2.6 started refusing circular bean references by default, so applications that started fine on 2.5 failed on 2.6. Boot 2.6 also switched the default MVC path matching strategy, which changed how some URL patterns matched. Spring Framework 6, under Boot 3, stopped matching a trailing slash by default, so a client calling /orders/ instead of /orders started getting 404. None of these appear as a compile error.

In one service, a team finds such a change in testing. Across a hundred services upgraded by different teams, some will find it in production. So the cost grows with the number of services, not with their size.

4Cost 3: The Skills to Read and Override It

Overriding auto-configuration correctly needs knowledge that ordinary feature work never teaches: which condition guards a bean, why defining our own bean of the same type makes Boot back off, how to read the condition evaluation report from debug=true or the Actuator conditions endpoint, and when to exclude a whole auto-configuration instead. Without that, teams copy overrides from old services, some of which no longer do anything, and the configuration slowly becomes folklore.

5Managing the Costs

The first tool is an internal starter, a company library with its own auto-configuration that sets our defaults: pool sizes, timeouts, JSON settings, observability, security headers. Services depend on it instead of choosing settings one by one. The decision is made once, by people who understand it, and changes ship as a version of the starter with notes.

The second is upgrade notes. For each Boot upgrade, a platform team reads the release notes and the migration guide, tries the upgrade on representative services, and publishes a short page: what changed, which services are affected, what to check. That turns a hundred teams' research into one team's.

The third is tests that assert important settings, so a changed default fails the build instead of production.

Java
@SpringBootTest
class PlatformDefaultsTest {
@Autowired DataSource dataSource;
@Autowired ObjectMapper mapper;
@Test void poolIsSizedForOurDatabase() {
assertThat(((HikariDataSource) dataSource).getMaximumPoolSize()).isEqualTo(20); // passes
}
@Test void datesAreIsoStrings() throws Exception {
assertThat(mapper.writeValueAsString(LocalDate.of(2026, 1, 5))).isEqualTo("\"2026-01-05\""); // passes
}
}
Step throughDeciding whether a setting stays implicit
  1. Would a change in this value cause an incident?
    YesWrite it explicitly and test itNoNext question
  2. Is it a company-wide choice?
    YesPut it in the internal starterNoLeave it to Boot's default

2 steps in order. Play them, or step through them one at a time.

The fourth is a rule: critical configuration is explicit. Timeouts, pool sizes, transaction boundaries and security settings are written in our configuration even when they equal Boot's current default, because the point is to make them independent of a future default. Everything else we gladly leave to Boot. Finally, we teach the skill: a short internal guide on reading the condition report and overriding beans pays for itself in the first incident it shortens.

6Follow-up questions

Doesn't an internal starter just add another hidden layer?

It does add a layer, but a visible one: it is our code, versioned, documented and owned by a team we can ask. The alternative is each service either accepting Boot's defaults blindly or copying overrides from another service. A starter should stay thin, setting values and adding company integrations, not reimplementing Boot.

How do you find which services depend on a default that is about to change?

Through the condition report and the configuration properties endpoint of the Actuator, collected from running services, plus a search of configuration files. If services run the internal starter, the platform team can also add a startup log or metric reporting the values that matter.

Would you ever go back to explicit Java configuration only?

Not for a whole organisation. The productivity gain is real and most defaults are good. The better trade is to keep auto-configuration and make the small set of risky settings explicit and tested.

7Conclusion

In this answer, we saw that auto-configuration is the first Spring configuration style where unwritten configuration still runs. That hides what is configured, lets upgrades change defaults without code changes, and requires skills many teams lack. We manage it with internal starters for company defaults, upgrade notes from a platform team, tests that assert important settings, training in the condition report, and explicit configuration for anything that would cause an incident if it changed.

What to say in the interviewAbout 90 seconds aloud

Open with

Auto-configuration is a great trade for one team and a hidden cost for an organisation. XML and Java configuration were both explicit: if we did not write it, it did not exist.

Then, if they want more

With Boot, beans appear whenever conditions match, so pool sizes, timeouts, JSON settings and error handling are decided outside our code. That creates three long-term costs. First, visibility: in an incident, people cannot see where a value like a pool size of 10 came from.

Second, upgrades: defaults change between versions, like Boot 2.6 rejecting circular references or Spring 6 no longer matching trailing slashes, so behaviour changes with no code change, and across a hundred services some of those reach production. Third, skills: teams need to read the condition report and override beans correctly, which ordinary feature work does not teach.

I would manage this with an internal starter that sets company defaults in one versioned place, a platform team publishing upgrade notes for each Boot release after trying it on representative services, and tests in each service that assert the settings that matter, so a changed default fails the build.

I would also set a rule that critical configuration, timeouts, pools, security and transactions, is written explicitly even when it matches Boot's default today. And I would invest a little in training on the condition report, because it pays back in the first incident.

About this answer

Last updated
12 November 2026
Versions it names
Spring Boot 2.6, Spring Framework 6
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.
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 "Spring configuration moved from XML to Java configuration to Boot auto-configuration....": https://scrivio-interview-library.netlify.app/spring-boot/spring-configuration/7f53a8eff6/