Spring Boot

Apache-2.0
Platform
Linux Windows macOS
Licence
Apache-2.0 Open source
Spring Boot

Overview

Spring Boot is a free, open-source framework that turns the Spring platform into a single runnable Java application. Where a plain Spring project asks you to wire up the servlet container, the dispatcher, a transaction manager and a JSON mapper yourself, Boot reads what is already on the classpath, decides what an application of that shape normally needs, and configures it before your own code runs. The project started in 2014 as the Spring team’s answer to the configuration-heavy reputation Spring had earned, and it has since become the usual starting point for new Java services — the repository carries more than 80,000 stars on GitHub, and most Java tutorials now begin with a Boot application class rather than a stack of XML.

The current line is 4.x. Version 4.1.2 shipped on 22 October 2026, built on Spring Framework 7.0 and requiring Java 17 or newer.

Key Features

  • Auto-configuration — Boot inspects the classpath and the beans you have declared, then configures the parts an application like yours usually needs; anything it guesses wrong can be overridden or switched off with a single property.
  • Starter dependencies — one line in Maven or Gradle (spring-boot-starter-web, -data-jpa, -security, -actuator) pulls a curated, version-aligned set of libraries instead of a hand-maintained dependency list.
  • Embedded server — Tomcat, Jetty or Undertow is packaged inside the jar, so the application starts with java -jar and needs no external servlet container and no WAR deployment.
  • Executable jar — the Maven and Gradle plugins repackage the build into a self-contained archive with its dependencies nested inside; the same file runs on a laptop, in a container or on a server.
  • Externalised configuration — application.properties or YAML, environment variables, command-line flags and Spring profiles layer in a fixed order, and @ConfigurationProperties binds them to typed objects with metadata your IDE can complete.
  • Actuator — health, metrics, environment, loggers, thread dumps, scheduled tasks and a software bill of materials are exposed as HTTP endpoints or over JMX, and the liveness and readiness groups plug straight into Kubernetes probes.
  • Observability — metrics through Micrometer and tracing through Micrometer Tracing with OpenTelemetry or Brave, without writing instrumentation by hand.
  • Testing support — spring-boot-starter-test brings JUnit 5, Mockito, AssertJ and Spring Test together, and @SpringBootTest boots the real application context for an integration test.
  • DevTools — automatic restart when classes change and live reload in the browser while you work.

Why Use Spring Boot?

The practical argument is time to first request. A team that already knows Spring can have a tested HTTP endpoint with JSON, validation and a health check running in an afternoon, and the same conventions keep holding when the codebase grows to dozens of modules. Boot also removes most of the which-version-of-which-library work: the parent POM and the bill of materials behind it pin a set of dependency versions that are known to work together, so an upgrade is one number in one file rather than an afternoon of conflict resolution.

It is opinionated without being a cage. Every auto-configuration is an ordinary Spring configuration class, and each one backs off as soon as you declare your own bean, so the escape hatch is the same mechanism the framework itself uses. Nothing is generated for you and no XML is required.

Use Cases

  • REST and JSON services — the most common shape: a @RestController, a repository and Actuator for health and metrics.
  • Microservices — a small Boot service per bounded context, packaged as a container image by the Cloud Native Buildpacks support (mvn spring-boot:build-image).
  • Internal tools and admin APIs — scheduled work with @Scheduled, batch jobs and small dashboards behind the company firewall.
  • Event-driven services — starter support for Kafka, RabbitMQ, AMQP, JMS and Pulsar, configured the same way as everything else.
  • Teaching and prototypes — Spring Initializr produces a working project in about thirty seconds.

Getting Started

The quickest route is Spring Initializr at start.spring.io: pick Maven or Gradle, a Java version and the starters you want, and download a zip with the build file, the application class and a test already in place. From there ./mvnw spring-boot:run starts the application on port 8080. A complete service is one annotated class and one controller method, so the classic hello-world fits in a dozen lines.

The only prerequisite is a JDK: 4.1.2 needs Java 17 at a minimum and is compatible with versions up to and including Java 27. Maven 3.6.3 or later, or Gradle 8.14 and later (9 included), is enough to build. A plain web service needs no separate application server, no database and no container runtime.

What Changed in 4.x

Spring Boot 4.0 moved the project onto Spring Framework 7.0 and split the codebase into finer-grained modules, so a build pulls in only the parts it uses. Three additions are worth knowing about. HTTP service clients let you annotate a plain Java interface with @HttpExchange and have Spring generate the implementation, with the same auto-configuration the server side already had. API versioning is now built into MVC and WebFlux, configured through spring.mvc.apiversion.*, so a version can be resolved from a header, a path segment or a media type without a custom resolver. Gradle 9 is supported alongside Gradle 8.14 and later, while an OpenTelemetry starter and a Kotlin Serialization starter replaced glue code teams used to write themselves. The 4.1 line has since added an SSL health indicator, MongoDB health indicators and a RestTestClient for tests.

How It Compares

Boot is not the only framework on the JVM. Quarkus and Micronaut both promise faster startup and a smaller memory footprint, with build-time dependency injection aimed at containers and GraalVM native images; Boot answers with native-image support of its own, through the Ahead-of-Time processing added in 3.0, and with the largest body of tutorials, guides and answered questions. Plain Spring Framework is still a reasonable choice for a team that wants to assemble its own stack, and a servlet container such as Tomcat on its own is lighter if you only need one small servlet. What Boot buys you is the convention layer between those two extremes, and the willingness to get out of the way when your requirements stop matching the defaults.

Learn and Get Help

The reference documentation at docs.spring.io/spring-boot is thorough and versioned, and the project’s Guides site walks through complete applications from an empty directory to a running service. The GitHub wiki carries release notes and migration guides for every minor version — worth reading before a major upgrade, because 4.0 renamed several modules. Questions tagged spring-boot on Stack Overflow are answered quickly, bugs go to the project’s issue tracker, and the source, samples and issue history all live in the open.

Explore More Categories

Sign In

Register

Reset Password

Please enter your username or email address, you will receive a link to create a new password via email.