@SpringBootApplication

The annotation on a Spring Boot main class that switches on component scanning, auto-configuration and configuration declarations in one go.

In more detail

The main method calls SpringApplication.run, which creates the application context and starts the application. The annotation implements no endpoint or business rule; it marks where framework infrastructure becomes available.

Example

@SpringBootApplication public class Application { ... SpringApplication.run(Application.class, args); }

Related terms

Taught in

References