Spring Boot helps developers create Spring applications quickly by providing defaults and auto-configuration, so you don't have to write a lot of setup code.
Spring Boot automatically starts an embedded server like Tomcat and sets up the application context, so the app is ready to serve requests immediately.
@SpringBootApplication is a convenience annotation that includes @Configuration, @EnableAutoConfiguration, and @ComponentScan.
public class MyApp { public static void main(String[] args) { SpringApplication.run(MyApp.class, args); } }
Without @SpringBootApplication, Spring Boot does not know how to configure and start the app.
First, the main method runs, then Spring Boot performs auto-configuration, then refreshes the application context, and finally runs CommandLineRunner beans.
