Spring Boot and Auto-Configuration
Cert Focus
You should know what Spring Boot adds on top of Spring Framework and how auto-configuration works.
Must Know
@SpringBootApplicationcombines@Configuration,@EnableAutoConfiguration, and@ComponentScan.- Starters provide curated dependency sets.
- Auto-configuration creates beans based on classpath, properties, and missing beans.
- Auto-configuration backs off when the user defines their own bean.
- Actuator exposes operational endpoints such as health, metrics, beans, and conditions.
- Runners and events allow code to run during startup.
Direct Book Links
- Spring Boot Mental Model
- Spring Boot Starters and Dependency Management
- Auto-Configuration Deep Dive
- Spring Boot Actuator
- Application Startup
- Week 3 Review
Exam Trap
Spring Boot does not replace Spring Framework. It configures and packages Spring applications more conveniently.
Self-Check
- Can I explain what
@SpringBootApplicationincludes? - Can I explain what a starter provides?
- Can I explain auto-configuration back-off?
- Can I explain how to debug why an auto-configuration matched?
Model Answers
@SpringBootApplication includes @Configuration, @EnableAutoConfiguration, and @ComponentScan.
A starter provides a curated dependency set for a feature, such as web, data JPA, security, or actuator.
Auto-configuration back-off means Spring Boot does not create its default bean when the application already provides a matching user bean.
To debug auto-configuration, inspect the conditions report, enable debug logging, or use the Actuator conditions endpoint.
Memory Sentence
Spring is the foundation; Spring Boot makes Spring easier to configure, run, and operate.