Lesson 1 / 25

Spring and Spring Boot

The most widely used Java framework, simplified.

Framework plus conventions

The Spring Framework provides dependency injection, web MVC, data access, transactions and much more for Java (and Kotlin). Spring Boot makes it practical: sensible defaults, starters that bundle compatible dependencies, auto-configuration that wires beans based on what is on the classpath and in configuration, an embedded web server so the app runs as a plain java -jar, and production features such as health checks and metrics. Spring Boot 4 (built on Spring Framework 7) requires Java 17 or later and splits auto-configuration into smaller, focused modules.

Opinionated Spring, ready to run

Spring Boot builds on the Spring Framework with starters, auto-configuration and an embedded server.

Three ideas: what Spring Boot is, starters, auto-configuration.
Figure 1.1 — Spring Boot, starters and auto-configuration.

A furnished flat

Spring is a well-built building; Spring Boot hands you a furnished flat: you can move in immediately and replace any furniture you do not like.

Start at start.spring.io

Spring Initializr generates a correct project with chosen versions and starters, avoiding dependency mismatches.

Quick check: What does Spring Boot add on top of the Spring Framework?

  • A database engine
  • A new programming language
  • Starters, auto-configuration, an embedded server and production features
  • A replacement for Java
Answer

Starters, auto-configuration, an embedded server and production features — Conventions and defaults on top of Spring.