Urgent.News

What's breaking now, across hundreds of outlets.

Tech

False Scent: When Spring Boot 4 Silently Ignores application.yml

Originally published on The Trail by Grupa VII . You copy a documented property straight from the Spring Boot reference guide into application.yml . Your IDE autocompletes it. The application boots cleanly with zero errors and zero warnings. And the setting does absolutely nothing. I learned that lesson the hard way during a real production outage on a peer-to-peer RSocket mesh (detailed in The…

False Scent: Spring Boot 4 Ignores application.yml Properties

When configuring Spring Boot applications using application.yml, there are instances where seemingly valid properties are completely ignored by the framework. This issue became particularly evident during a production outage involving a peer-to-peer RSocket mesh. Dashboards appeared green, heartbeats flowed, and customer data ceased arriving without any warnings.

Investigating the problem led to the discovery that the configuration was being gated by a conditional annotation. RSocketProperties parsed and bound the fragment-size property cleanly, yet the wiring never loaded due to the conditional gating. This led to the bound property sitting orphaned in memory until a programmatic RSocketServerCustomizer replaced it.

Spring Boot's auto-configuration engine operates on two largely independent pipelines: property binding and condition evaluation. Property binding checks if the YAML is valid for a bound properties class, while condition evaluation determines whether a specific auto-configuration class should participate in the application context.

The two systems have no coupling, meaning Spring Boot emits no warning when a property binds cleanly to a *Properties bean while the specific @Bean method responsible for reading it backs out due to an unmet @Conditional* annotation.

Spring Boot 4.0 introduced a modularization approach by breaking the monolithic spring-boot-autoconfigure JAR into focused technology modules, such as spring-boot-jdbc, spring-boot-cache, and spring-boot-rsocket. However, this change introduced a new silent failure mode during migrations. If a library like spring-kafka is brought in without its dedicated Spring Boot module, the corresponding auto-configuration class is simply absent.

This results in the YAML staying valid, startup remaining green, and the property not being wired up.

Four Silent @Conditional Traps:

1. Caching Silently Falling Back to Unbounded ConcurrentHashMap:

- When @EnableCaching is used with Caffeine or Redis TTLs in application.yml, memory climbs steadily in production pods.

- In Spring Boot 4.0, SimpleCacheConfiguration fails to register due to missing dependencies and is forced to use a ConcurrentMapCacheManager.

- The fix is to explicitly pin the cache type (caffeine or redis) to avoid the fallback to an unbounded ConcurrentHashMap.

2. DataSource Pool Tuning Silently Dropping Back to 10 Connections:

- Adding a second DataSource bean or writing a custom DataSource for credential rotation can cause connection timeouts in peak load scenarios.

- In Spring Boot 4.0, DataSourceAutoConfiguration imports HikariDataSource guarded by @ConditionalOnMissingBean(DataSource.class).

- If no DataSource is available, the pool reverts to the default 10-connection limit, leading to connection timeouts.

- The solution is to explicitly configure the DataSource properties to prevent this silent fallback.

Rewritten by urgent.news; may contain errors — check the original.

Source: dev.to

Read the original at dev.to →

More from Dev.to on urgent.news

Get the news by email. Yesterday's most-covered stories, every morning.

We track opens and clicks to improve the newsletter.

See today's edition · More options

More in Tech

The Sunday Papers

Sundays are for chopping up and responsibly disposing of the company credit card that you’ve had for two years but never actually used, because some of us are independent spirits who can pay for our…

More from Sunday, 6 December 2026 →