Why Spring Boot?
The problem it solves
Plain Java gives you a language, not an application. A service needs an HTTP server, JSON mapping, a connection pool, transactions, config per environment, health checks, metrics and tests. Spring Boot wires all of that from a dependency list and sensible defaults.
One dependency and four lines is a running HTTP service.
The three ideas
| Idea | What it means |
|---|---|
| Inversion of control | you declare components, the container creates and connects them |
| Auto-configuration | classpath contents decide what gets configured |
| Starters | one dependency per topic, versions pinned by the parent |
Every default is replaceable: define your own bean, and the auto-configured one backs off.
The ecosystem
| Project | For |
|---|---|
| Spring Framework 7 | core container, MVC/WebFlux, transactions |
| Spring Data | JPA, MongoDB, Redis repositories |
| Spring Security | authentication and authorization |
| Spring Boot Actuator | health, metrics, observability |
| Spring Batch / Integration / Kafka | jobs, pipelines, messaging |
What is new in Spring Boot 4
- Modularization — many small jars instead of one
spring-boot-autoconfigure - Null safety — the whole portfolio is annotated with JSpecify
- API versioning — first-class support in Spring MVC and WebFlux
- HTTP service clients — declare an interface, get an implementation
- Java 25 support — with Java 17 still the baseline
- Resilience —
@Retryableand@ConcurrencyLimitmoved into the core framework - RestTestClient — one test client for mock and live servers
Built on Spring Framework 7, Jakarta EE 11, Jackson 3 and Kotlin 2.2.
Coming from Spring Boot 3?
Most code compiles unchanged. Watch for: Jackson 2 support deprecated, a few renamed
properties (spring.dao.exceptiontranslation.enabled → spring.persistence.exceptiontranslation.enabled,
management.tracing.enabled → management.tracing.export.enabled), and @MockBean replaced by @MockitoBean.
When not to use it
- a 200-line CLI tool — plain Java is lighter
- hard real-time or tiny memory budgets — the container costs startup and RAM
- a library that others embed — keep it framework-free
★ Exercises
- Name three things auto-configuration does for
spring-boot-starter-web. - Remove the web starter from a project. What still runs?
- Look up two more starters at start.spring.io and say what each adds.
- Which of the Boot 4 features above would change code you already have?