What is Spring Boot?
Definition
Spring Boot is a project under the Spring umbrella that provides a fast and easy way to build production-ready Spring applications. Spring Boot takes all the powerful concepts of the Spring Framework and wraps them in a convention over configuration approach.
Convention Over Configuration
With Spring Boot, you don't need to write lots of XML or manual configuration. The framework uses built-in conventions — just follow the existing patterns and everything works.
Auto-Configuration
When you add a starter dependency, Spring Boot automatically configures the components it needs. Example: adding spring-boot-starter-web automatically enables Tomcat and MVC without any extra configuration.
@SpringBootApplication
public class MyApp {
public static void main(String[] args) {
SpringApplication.run(MyApp.class, args);
}
}
// That's it — Tomcat, Spring MVC, and JSON are already active!
Embedded Server
No need to deploy to a separate Tomcat or Jetty. Spring Boot ships with a built-in embedded server. Just run the JAR file, and the application is up and running.
Starter Dependencies
Spring Boot provides dependency bundles called starters. A single starter covers all the libraries needed for a particular feature.
| Starter | Purpose |
|---|---|
spring-boot-starter-web |
Web MVC + Tomcat |
spring-boot-starter-data-jpa |
Database + Hibernate |
spring-boot-starter-security |
Authentication & authorization |
spring-boot-starter-test |
Testing (JUnit, Mockito) |
spring-boot-starter-actuator |
Monitoring & metrics |
Spring vs Spring Boot
| Aspect | Spring Framework | Spring Boot |
|---|---|---|
| Configuration | Manual (XML/Java) | Auto-configuration |
| Server | Requires deployment to an external server | Embedded server |
| Dependencies | Added one by one | Starter dependencies |
| Setup | Cumbersome, lots of boilerplate | Fast, minimal configuration |
| Monitoring | Manual setup | Built-in Actuator |
Spring Boot: Production-Ready
Spring Boot ships with production-ready features out of the box:
- Health check and metrics via Actuator
- Externalized configuration for different environments
- Integrated logging (Logback by default)
- Graceful shutdown support
Summary
Spring Boot does not replace the Spring Framework — it wraps it to make it easier to use. With auto-configuration, an embedded server, and starter dependencies, you can focus on writing business code instead of configuration.
In the next chapter, we'll get hands-on: installing and setting up your first Spring Boot project.