@SpringBootApplication is a convenience annotation that combines three annotations. One line on the main class registers your configuration and turns on auto-configuration and component scanning.
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}
It is equivalent to:
@SpringBootConfiguration: marks the class as a source of beans. It is a specialized @Configuration that also helps tests find your configuration.
@EnableAutoConfiguration: turns on auto-configuration, which creates beans from the libraries on the classpath.
@ComponentScan: scans the current package and its sub-packages for components.
Scanning starts at the package of this class, so put the main class in a root package above your other classes.
Rewriting in plainer words…
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.