Latest in branch 2.4
2.4.13
Released 18 Nov 2021
(4 years ago)
SoftwareSpring Boot
Version2.4
Supported
Java versions
Java 8+
Initial release2.4.0
12 Nov 2020
(5 years ago)
Latest release2.4.13
18 Nov 2021
(4 years ago)
End of
OSS support
Nov 2021
(Ended 4 years, 6 months ago)
End of
enterprise support
Feb 2023
(Ended 3 years, 3 months ago)
Release noteshttps://github.com/spring-projects/spring-boot/wiki/Spring-Boot-2.4-Release-Notes
Source codehttps://github.com/spring-projects/spring-boot/tree/v2.4.13
Documentationhttps://docs.spring.io/spring-boot/docs/2.4.13/reference/html/
Migration guidehttps://github.com/spring-projects/spring-boot/wiki/Spring-Boot-Config-Data-Migration-Guide
Spring Boot 2.4 ReleasesView full list

What Is New in Spring Boot 2.4

Spring Boot 2.4 delivers significant updates to configuration handling, cloud integration, and developer tooling. This release streamlines the path to production with better Docker image support and refined property management.

Category Key Changes
New Features Config Data API, Docker image building, Volume mounts
Improvements Spring Cloud Bootstrap context, Graceful shutdown, Health groups
Deprecations Legacy configuration processing, spring.config.location
Dependency Updates Spring Framework 5.3, Spring Data 2020.0, Spring Security 5.4

How did configuration handling change in 2.4?

The biggest shift is the new Config Data API, which completely overhauls how external configuration is loaded. It replaces the previous property source system with a more extensible model that supports importing configuration from various locations like directories, JAR files, or even Kubernetes volumes.

In practice, this means your application.properties or application.yml can now use a new spring.config.import key to explicitly pull in additional config files. The old spring.config.location behavior is now deprecated. This change makes configuration more predictable and easier to trace, especially in complex cloud environments.

What are the updates for Docker and cloud deployment?

Spring Boot 2.4 makes building efficient Docker images a first-class citizen. The Spring Boot Maven and Gradle plugins now directly support building layered Docker images using Cloud Native Buildpacks without any custom configuration.

You can simply run ./mvnw spring-boot:build-image to create an optimized, production-ready OCI image. This matters because it drastically reduces the effort required to containerize your application and follows modern cloud-native practices. The support for volume mounts also simplifies configuring secrets in platforms like Kubernetes.

How does 2.4 improve application lifecycle?

Graceful shutdown is now enabled by default for all embedded web servers. When a shutdown signal is received, the web server will stop accepting new requests and wait for existing requests to complete before shutting down.

Health groups have also been enhanced, allowing you to create custom aggregations of health indicators for different deployment scenarios. For instance, you can define a "readiness" group that only includes database and disk checks, which is perfect for Kubernetes liveness probes.

What about Spring Cloud integration changes?

The way Spring Boot initializes the Spring Cloud context has been redesigned. The bootstrap.yml file and the spring-cloud-starter-bootstrap dependency are no longer required by default.

Instead, you can now enable the bootstrap context with the spring.cloud.bootstrap.enabled=true property or through the spring.config.import mechanism. This cleanup reduces magic and makes the integration between Boot and Cloud more explicit and easier to debug.

FAQ

Why is my application failing to start after upgrading to 2.4?
This is likely due to the new configuration processing. Check if you were using spring.config.location with specific files; you need to replace it with spring.config.import. Also, ensure any custom profiles activate correctly under the new rules.

Do I need to change my Docker build process?
Your existing process will still work, but you should consider switching to the new built-in build-image goal. It creates optimized, layered images that start faster and have a smaller footprint compared to traditional Dockerfile approaches.

What happened to my bootstrap.yml file?
The bootstrap context is now disabled by default. If you need it for Spring Cloud Config, you must add the spring-cloud-starter-bootstrap dependency and set spring.cloud.bootstrap.enabled=true, or use the new spring.config.import=configserver: syntax.

How do the health group changes affect my Kubernetes probes?
Health groups give you more control. You can now define a specific group for your liveness probe that excludes slow-checking indicators, making your probes more reliable and preventing unnecessary pod restarts.

Is the legacy configuration processing completely removed?
No, it's deprecated but still available. You can set spring.config.use-legacy-processing=true to temporarily revert to the old behavior. However, you should migrate to the new model as the legacy support will be removed in a future release.

Releases In Branch 2.4

VersionRelease date
2.4.1318 Nov 2021
(4 years ago)
2.4.1221 Oct 2021
(4 years ago)
2.4.1123 Sep 2021
(4 years ago)
2.4.1019 Aug 2021
(4 years ago)
2.4.922 Jul 2021
(4 years ago)
2.4.824 Jun 2021
(4 years ago)
2.4.710 Jun 2021
(5 years ago)
2.4.620 May 2021
(5 years ago)
2.4.515 Apr 2021
(5 years ago)
2.4.418 Mar 2021
(5 years ago)
2.4.318 Feb 2021
(5 years ago)
2.4.215 Jan 2021
(5 years ago)
2.4.111 Dec 2020
(5 years ago)
2.4.012 Nov 2020
(5 years ago)
2.4.0-RC130 Oct 2020
(5 years ago)
2.4.0-M415 Oct 2020
(5 years ago)
2.4.0-M317 Sep 2020
(5 years ago)
2.4.0-M213 Aug 2020
(5 years ago)
2.4.0-M129 Jun 2020
(5 years ago)