Back to course

The @SpringBootApplication Annotation

Spring Boot 0 to Hero: The Complete Java Backend Masterclass

Decoding @SpringBootApplication

This single annotation is a convenience annotation that adds all of the following:

  1. @Configuration: Tags the class as a source of bean definitions.
  2. @EnableAutoConfiguration: Tells Spring Boot to start adding beans based on classpath settings.
  3. @ComponentScan: Tells Spring to look for other components, configurations, and services in the package.