beginnerCore Annotations & Auto-Configuration

What exactly does `@SpringBootApplication` bundle together?

It's a meta-annotation combining three: `@Configuration` (this class can define beans), `@EnableAutoConfiguration` (turn on the classpath-conditional auto-config scanning), and `@ComponentScan` (scan this package and sub-packages for `@Component`/`@Service`/`@Repository`/`@Controller` classes). Understanding this matters because moving your main class to a different package can silently break component scanning for classes outside its scan radius.

This is a Pro chapter

Sign in, then upgrade to Pro or Power to unlock this and the full Spring Ecosystem Mastery library.

What exactly does `@SpringBootApplication` bundle together?

Next Step

Continue to How would you exclude one specific auto-configuration class from being applied?← Back to all Spring Boot questions