Spring Boot and auto-configuration
Spring Boot starts with the classpath, configuration properties, and existing beans, then supplies sensible missing infrastructure.
What
@SpringBootApplication combines
@Configuration: this class can define beans.@EnableAutoConfiguration: apply matching auto-configuration.@ComponentScan: find components below the application package.
Conditional configuration
Auto-configuration uses conditions such as “class exists,” “property is set,” or “no bean of this type exists.” Your bean usually makes Boot back away. The conditions report and startup diagnostics explain why a configuration matched.
Starters and dependency management
Starters group common dependencies. Boot's dependency management chooses a tested set of versions. Avoid overriding individual library versions casually; you can leave the tested compatibility set.
Current baseline
As checked on 2026-08-05, the current docs list Spring Boot 4.1.0 with Spring Framework 7.0.8+, Java 17+, Maven 3.6.3+, and supported Gradle 8/9 lines. Always verify the system-requirements page before starting or upgrading.
Customize safely
Prefer configuration properties or a user bean over excluding broad auto-configuration. Use exclusions when the whole feature truly does not fit. Keep the main application class in a root package so scanning is predictable.
Feynman check
Boot is a hotel room prepared from your reservation. If the classpath says “web guest,” it prepares a server. If you provide your own pillow—a bean—Boot usually does not replace it.