Spring Boot offers auto-configuration and starter dependencies that automatically set up common features. This reduces the need for manual XML or Java configuration, making it faster and easier to start projects compared to plain Spring.
@SpringBootApplication is a convenience annotation that combines @Configuration, @EnableAutoConfiguration, and @ComponentScan. This means it enables auto-configuration and scans for components automatically.
The correct Gradle dependency for Spring Boot web starter is implementation 'org.springframework.boot:spring-boot-starter-web'. The 'compile' configuration is deprecated, and the artifact ID must be exact.
Spring Boot includes an embedded server (like Tomcat) and manages the application lifecycle automatically, including startup and graceful shutdown, which plain Spring requires manual setup for.
public class DemoApplication { public static void main(String[] args) { SpringApplication.run(DemoApplication.class, args); } }
If the web controller class is missing at runtime, it usually means the web starter dependency is not included, so Spring Boot cannot find the required classes to start the web server.