Spring Boot 4.2 Lands: RestTemplate Deprecated, Redirect Defaults Flip, and Pulsar Support Ends
Upgrading to 4.2 changes runtime behavior without warnings—redirect URLs become relative and X-Forwarded-Prefix is ignored, so proxy-deployed apps can lose path prefixes. Spring Boot 4.1 open-source support ends July 2027, so staying on 4.1 only works until then; deprecations like RestTemplate give time but pile up as technical debt.
Spring Boot 4.2.0, released November 19, 2026, brings a batch of deprecations that will hit long-standing projects hard. The full RestTemplate infrastructure—auto-configuration, builder, customizers, and TestRestTemplate—is now deprecated, with RestClient and RestTestClient as the replacements. Apache Pulsar support is also deprecated, with 2.0.8 as the final Spring-managed version; future updates come from the Apache Pulsar project itself.
More dangerous than the deprecations are the silent default changes. `server.tomcat.servlet.use-relative-redirects` flips from false to true, so Tomcat now returns relative redirect URLs by default. X-Forwarded-Prefix is ignored by default, which can drop a path prefix for apps behind proxies. These changes produce no warnings—only altered behavior at runtime. A configuration property move from `server.tomcat.*` to `server.tomcat.servlet.*` also carries a deprecated old path.
On the positive side, 4.2 adds native AMQP 1.0 support for RabbitMQ, letting polyglot systems use one standard protocol without custom adapter layers. Executable jar startup gets faster, a direct win for Serverless, FaaS, and Kubernetes scaling. Janino dependency management is removed, so projects using it must declare a version or fail to compile. Spring Boot 4.1.x open source support ends July 31, 2027, putting a hard deadline on the "stay put" strategy.
Deprecation rather than removal gives projects a safety window, but the silent default changes are the real risk because they alter behavior without any diagnostic output.
Aligning Spring's default with Tomcat's own default is a maintenance choice, yet it forces existing applications to either accept a behavior change or add explicit configuration to opt out.
The X-Forwarded-Prefix change hits a common deployment pattern (multiple proxy layers), so the impact will be underestimated until a path mangling bug surfaces in production.
AMQP 1.0 support arriving after Pulsar's deprecation shows Spring is consolidating around standard protocols while pushing more specialized integrations to their own communities.
The extended 4.1 support window (until July 2027) is a deliberate bridge, but treating it as indefinite is a trap given the cumulative migration burden.
The migration from RestTemplate to RestClient is mostly mechanical, but the scale of existing usage makes it a project-level effort rather than a quick code change.