Member-only story
15 Spring Boot 4 Features That Feel Like Easter Eggs
A readiness switch that turns a pod’s probe to 503 without touching liveness, an exit code your batch job can return, and a virtual-thread app that quietly exits after one tick. Fifteen hidden Spring Boot 4 features, with real output.
I put SPRING_APPLICATION_JSON='{"eggs":{"from-json":"hello"}}' in front of a Spring Boot 4.0.7 app with no config file for that key, and env.getProperty("eggs.from-json") came back as hello. No code, no profile, no extra dependency. The feature has been in Spring Boot for years.
Spring Boot has a lot of these: small features that are documented, stable and useful, and that most teams never find because nobody goes looking. We tend to think we know a framework once we have shipped a few services with it. We usually know the 20% we needed on the first day. The rule for this list: every item had to run on Spring Boot 4.0.7 and Java 25 in a small probe project, and the output under each item is what it printed. If it did not run, it is not here.
The short version:
AvailabilityChangeEvent.publish(ctx, ReadinessState.REFUSING_TRAFFIC)turned/actuator/health/readinessfrom200 UPto503 OUT_OF_SERVICE, while liveness stayed200 UP.- A configuration value of
10MBbinds to 10,485,760 bytes, andretention: 7with@DurationUnit(DAYS)…









