What’s New in Spring Boot 2.5.0? Key Features, Updates & Deprecations

Spring Boot 2.5.0 introduces Java 16, Gradle 7, Jetty 10 support, enhanced Docker image building, dark‑mode docs, numerous configuration improvements, updated dependency versions, and several deprecations, providing developers with a richer, more modern backend framework.

Programmer DD
Programmer DD
Programmer DD
What’s New in Spring Boot 2.5.0? Key Features, Updates & Deprecations
Spring Boot 2.5.0 banner
Spring Boot 2.5.0 banner

Spring Boot 2.5.0 was released with many exciting new features.

Main Updates

Support for Java 16

Support for Gradle 7

Support for Jetty 10

Enhanced Docker image building

Updated datasource initialization mechanism

The documentation now includes a dark‑mode option.

Dark mode preview
Dark mode preview

Other Updates

management.endpoints.web.cors.allowed-origin-patterns

can control Actuator CORS HttpSessionIdListener is auto‑registered to the servlet context

Couchbase now defaults to an auto‑configured ObjectMapper Elasticsearch Sniffer auto‑configures when elasticsearch‑rest-client‑sniffer is on the classpath spring.data.cassandra.controlconnection.timeout configures Cassandra connection timeout spring.kafka.listener.only-log-record-metadata configures metadata logging on retries

Apache Phoenix JDBC URLs ( jdbc:phoenix) are auto‑detected

The Actuator discovery page ( /actuator) can be disabled via management.endpoints.web.discovery.enabled Actuator /configprops and /env endpoints can hide keys via additional-keys-to-sanitize Custom JMX Actuator endpoints can use EndpointObjectNameFactory When Spring Security is present, RSAPublicKey and RSAPrivateKey are auto‑configured

RabbitMQ ConnectionFactory can be customized with

ConnectionFactoryCustomizer
CloudPlatform

now auto‑detects Azure App Service server.tomcat.keep-alive-timeout configures Tomcat keep‑alive timeout server.tomcat.max-keep-alive-requests sets max requests per keep‑alive connection spring.webflux.session.cookie.same-site sets WebFlux SameSite cookie policy (default lax)

Apache HttpClient 5 is now the default for WebClient auto‑configuration

Dependency Versions

Spring Boot 2.5 updates many starter dependencies, including:

Spring Data 2021.0

Spring HATEOAS 1.3

Spring Integration 5.5

Spring Kafka 2.7

Spring Retry 1.3

Spring Security 5.5

Spring Session 2021.0

Third‑party libraries also receive updates, such as Kotlin 1.5, Groovy 3.0, Flyway 7.7, Liquibase 4.2, Jackson 2.12, Kafka 2.7, Cassandra Driver 4.10, Embedded Mongo 3.0, Hibernate Validator 6.2, Jersey 2.33, Mockito 3.7, MongoDB 4.2, JUnit Jupiter 5.7, and Elasticsearch 7.12.

Deprecations

Notable deprecations include moving ActuatorMediaType and ApiVersion from org.springframework.boot.actuate.endpoint.http to org.springframework.boot.actuate.endpoint, and the removal of certain jOOQ provider callbacks in favor of

org.springframework.boot.autoconfigure.jooq.DefaultConfigurationCustomizer

. The EntityManagerFactoryDependsOnPostProcessor has been relocated to org.springframework.boot.autoconfigure.orm.jpa.

Deprecation illustration
Deprecation illustration
For more details, see the official Spring Boot 2.5.0 release notes.
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.

JavaDockerBackend Developmentdependency managementSpring BootActuator
Programmer DD
Written by

Programmer DD

A tinkering programmer and author of "Spring Cloud Microservices in Action"

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.