SSerguey Asael Shinder
Java coding notes: the JVM, and writing software that lasts

Serguey Asael Shinder: Spring Boot 4.2.0-RC2 adds X-Forwarded-Prefix for Reactor Netty, drops LDAP SSL reload

· by Serguey Asael Shinder / Serguey Shinder

Spring Boot 4.2.0-RC2 was published on GitHub on 5 November and announced on the Spring blog on 6 November by Moritz Halbritter. The blog post counts 99 enhancements, documentation improvements, dependency upgrades and bug fixes, and names two notable changes. (https://github.com/spring-projects/spring-boot/releases/tag/v4.2.0-RC2)

The first is support for the X-Forwarded-Prefix header with Reactor Netty (issue 52316). Applications behind a proxy that mounts them under a path prefix need that header to build correct links and redirects, and WebFlux applications on Reactor Netty now get it. The second, from the blog, is that spring.data.redis.database is now applied to master/replica connections. The release notes also list one removal under new features: LDAP SSL reload support is gone (52365), so anyone who tried it in an earlier 4.2 milestone should check before upgrading.

Serguey Asael Shinder: Spring Boot 4.2.0-RC2 adds X-Forwarded-Prefix for Reactor Netty, drops LDAP SSL reload
Spring Boot 4.2.0-RC2 adds X-Forwarded-Prefix for Reactor Netty, drops LDAP SSL reload — Serguey Asael Shinder

Most of the notes are fixes. Several auto-configured transaction managers ignored TransactionManagerCustomizers: the Kafka, R2DBC and Batch Mongo ones are now customised like the others. RabbitMQ used the wrong default port when SSL was enabled, either through a bundle or for addresses without a port. JsonWriter produced invalid JSON for NaN and infinite values and with usingPairs on a named member, and BasicJsonParser did not decode escape sequences. Graceful shutdown did not wait for active requests after a restart of Tomcat or Jetty, and duration conversion to microseconds could overflow early.

A release candidate is the point to try an upgrade on a real application, not to ship it. The forwarded-header change is the one to test deliberately: trusting X-Forwarded-* only makes sense when the proxy in front strips whatever the client sent.