What’s New in Spring Boot 2.5? Key Features and Changes Explained

Spring Boot 2.5 introduces secure info endpoints, graceful shutdown via GET, shutdown logging, a new Quartz actuator endpoint, layered WAR support, Buildpack image building, environment variable prefixes, enhanced metrics, HTTP/2 over TCP (h2c), and several datasource improvements, all aimed at smoother microservice development.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
What’s New in Spring Boot 2.5? Key Features and Changes Explained

Introduction

Spring Boot 2.5.0 RC1 has been released and is scheduled for GA on May 20. Below are the most notable changes.

1. Runtime Endpoint Changes

Secure info endpoint – the /info endpoint is no longer exposed publicly; when Spring Security is on, it requires authentication.

Graceful shutdown now supports GET requests – previously a kill would abort in‑flight requests causing data inconsistency. Spring Boot 2.3 introduced graceful shutdown; see related article.

Shutdown logging – you can record resource‑release logs when the JVM exits using the property logging.register-shutdown-hook.

New Quartz actuator endpoint – a /quartz endpoint provides detailed information about Quartz jobs and triggers. Example request:

curl 'http://localhost:8080/actuator/quartz' -i -X GET

Response example:

{
  "jobs": {
    "groups": [ "samples", "tests" ]
  },
  "triggers": {
    "groups": [ "samples", "DEFAULT" ]
  }
}

2. Enhanced Containerization Features

1) Layered WAR support

The Maven and Gradle plugins now allow you to build layered WAR files for Docker, similar to the earlier layered JAR support.

2) Buildpack custom configuration

Spring Boot 2.4 introduced a Buildpack‑based Docker builder integrated into spring-boot-maven-plugin. You can configure the target registry and host to build images, e.g.: mvn spring-boot:build-image Spring Boot 2.5 adds more customization, moving closer to eliminating Dockerfiles.

3. Environment Prefix

You can set a prefix for system environment variables using SpringApplication.setEnvironmentPrefix(...). Example:

SpringApplication application = new SpringApplication(MyApp.class);
application.setEnvironmentPrefix("myapp");
application.run(args);

Now properties require the prefix, e.g. myapp.server.port=8080.

4. Metrics Enhancements

Metrics for Spring Data Repositories

@Timed metrics with WebFlux

MongoDB metrics

Note: mica 2.4.5 adds unique support for Druid and Undertow metrics.

5. HTTP/2 over TCP (h2c)

All four embedded web containers now support HTTP/2 over clear‑text (h2c). Enable it by setting server.http2.enabled=true and server.ssl.enabled=false. Full stack support requires compatible Feign and RestTemplate clients; see spring‑cloud‑java11 and related issues.

6. DataSource Enhancements

Multi‑datasource health monitoring – the health endpoint now shows the status of each routed datasource. You can ignore them with management.health.db.ignore-routing-data-sources=true.

Datasource initialization property rename – spring.datasource.init is now spring.sql.init, also applicable to R2DBC.

Data initialization refactor – support for schema.sql and data.sql is redesigned. If you need JPA initialization to run after scripts, set spring.datasource.initialization-order=after-jpa.

Conclusion

Contributors: Zhang Yadong, Rumeng Tech, Lengleng.

Feel free to submit in‑depth and interesting articles.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

BackendJavaDockerMetricsSpring BootActuator
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.