Commit Graph
1249 Commits
Author SHA1 Message Date
Brian Clozel 66a093dbfa Refine Forwarded headers configuration for Reactor servers
This commit introduces new properties for configuring the HTTP headers
that should be used for forward support.
The new `server.netty.forwarded-headers.header-format` property allows
"standard" or "x_forwarded" to select "Forwarded" or "X-Forwarded-*"
headers.

This aligns the behavior of Netty server with the "FRAMEWORK" strategy.

Closes gh-51031
2026-07-31 14:10:21 +02:00
Brian Clozel 941045a2f4 Refine Forwarded headers configuration for Jetty servers
This commit introduces new properties for configuring the HTTP headers
that should be used for forward support.
The new `server.jetty.forwarded-headers.header-format` property allows
"standard" or "x_forwarded" to select "Forwarded" or "X-Forwarded-*"
headers.

This aligns the behavior of Jetty server with the "FRAMEWORK" strategy.

Closes gh-51148
2026-07-30 15:12:48 +02:00
Stéphane Nicoll e398c1ad97 Merge branch '4.1.x'
Closes gh-51160
2026-07-30 08:45:02 +02:00
Stéphane Nicoll aedcc514b8 Merge branch '4.0.x' into 4.1.x
Closes gh-51159
2026-07-30 08:44:46 +02:00
vvzvvv e02521d12b Remove unnecessary null check in GroovyTemplateAutoConfigurationTests
The context field is final and eagerly initialized, so it can
never be null at teardown time.

See gh-51147

Signed-off-by: vvzvvv <tmdgusv@gmail.com>
2026-07-30 08:41:53 +02:00
Brian Clozel b9fb384f8d Update Forwarded headers support for Framework
Prior to this commit, Spring Boot would auto-configure the
`ForwardedHeaderFilter`/`ForwardedHeaderTransformer` when the "NATIVE"
strategy is chosen.
Spring Framework now requires an explicit choice between the supported
HTTP header variants as of spring-projects/spring-framework#37072.

This commit adapts to this new behavior with the following:
* the "FRAMEWORK" strategy now only applies to Spring MVC and Spring
  WebFlux applications, since "NATIVE" strategies are now a good choice
  for most deployments.
* the format of HTTP headers is now configured with
  `spring.mvc.forwarded-headers.header-format` and
  `spring.webflux.forwarded-headers.header-format`, with additional
  options.

The default header format is now "X-Forwarded-*" for both NATIVE and
FRAMEWORK strategies. The reference documentation also reflects those
changes.

Closes gh-51030
2026-07-29 14:45:12 +02:00
Moritz Halbritter be35ff4149 Polish "Disable Micrometer global registry in tests by default"
See gh-51142
2026-07-29 11:37:35 +02:00
Moritz Halbritter 3c45428b58 Merge branch '4.1.x'
Closes gh-51136
2026-07-28 10:17:37 +02:00
Moritz Halbritter 84d0caf7ee Merge branch '4.0.x' into 4.1.x
Closes gh-51135
2026-07-28 10:17:26 +02:00
Moritz Halbritter 19153b69a4 Polish "Prevent Micrometer global registry from pinning application contexts"
See gh-50886
2026-07-28 10:14:06 +02:00
LordKay-sudo 7f8a75a6fb Prevent Micrometer global registry from pinning application contexts
Track meter registries added to Metrics.globalRegistry and remove them
on context close.

Disable use of the global registry in tests by default to avoid pinning
cached test contexts.

See gh-50886

Signed-off-by: LordKay-sudo <lkandiro@gmail.com>
2026-07-28 10:14:06 +02:00
Stéphane Nicoll e7741bf152 Start building against Spring Framework 7.1.0-M1 snapshots
See gh-51123
2026-07-27 21:16:50 +02:00
Stéphane Nicoll 297ee86945 Polish "Deprecate TestRestTemplate"
See gh-46632
2026-07-27 21:12:35 +02:00
Stéphane Nicoll 30f358ab9b Polish "Use GracefulHandler for graceful shutdown of Jetty"
See gh-51128
2026-07-27 19:51:11 +02:00
Alessio Attilio 12eeed09fe Use GracefulHandler for graceful shutdown of Jetty
See gh-51128

Signed-off-by: Alessio Attilio <309061723+alessio-attilio@users.noreply.github.com>
2026-07-27 19:47:20 +02:00
Brian Clozel c539367ea2 Deprecate TestRestTemplate
Closes gh-46632
2026-07-27 16:55:39 +02:00
Brian Clozel c06abc12ac Replace TestRestTemplate with RestTestClient in module tests
Before deprecating `TestRestTemplate`, we must first stop using it in
module tests and replace it with:
* `RestTestClient` when the Spring MVC infrastructure is present
* `RestClient` when the test does not have Spring MVC on classpath

See gh-46632
2026-07-27 16:13:10 +02:00
Brian Clozel 2e650ac4a7 Add testing utility for RestTestClient
This commit adds a new `TrustAllTlsRequestFactory` request factory that
can be used in tests for connecting a `RestTestClient` to a TLS endpoint
without checking the certificates validity.

See gh-46632
2026-07-27 16:07:11 +02:00
Stéphane Nicoll 7fe6df88cf Merge branch '4.1.x'
Closes gh-51126
2026-07-25 17:25:28 +02:00
wantaek 5ebd999dd6 Fix stale type reference for OTLP logging transport metadata
See gh-51119

Signed-off-by: wantaek <wantaekchoi@gmail.com>
2026-07-25 17:24:20 +02:00
Stéphane Nicoll 3959c56bdd Deprecate RestTemplate support
With Spring Framework 7.1 deprecating RestTemplate for removal, this
commit deprecates our supporting infrastructure as well, and steers
users towards RestClient instead:

* RestTemplateAutoConfiguration and
  RestTemplateObservationAutoConfiguration
* RestTemplateBuilder, RestTemplateBuilderConfigurer, and
  RestTemplateBuilderClientHttpRequestInitializer
* RestTemplateCustomizer, RestTemplateRequestCustomizer, and
  ObservationRestTemplateCustomizer
* MockRestServiceServerAutoConfiguration,
  MockServerRestTemplateCustomizer, and RootUriRequestExpectationManager
  in the test support module

The reference documentation no longer covers RestTemplate and now
solely documents RestClient and WebClient. Code snippets and sample
tests that only existed to illustrate RestTemplate usage have been
removed accordingly.

Closes gh-51118
2026-07-25 08:32:32 +02:00
Stéphane Nicoll 2a8da4b465 Merge branch '4.1.x' 2026-07-25 07:22:49 +02:00
Stéphane Nicoll bc156310c2 Merge branch '4.0.x' into 4.1.x 2026-07-25 07:22:31 +02:00
Stéphane Nicoll 578aca2b08 Polish "Use RestClient in tests and infrastructure code"
See gh-51120
2026-07-25 07:22:03 +02:00
Stéphane Nicoll 07f80348a5 Polish "Remove APIs that were deprecated for removal in 4.2"
See gh-50955
2026-07-24 15:57:23 +02:00
Stéphane Nicoll d4d503b403 Merge branch '4.1.x' 2026-07-24 15:30:50 +02:00
Stéphane Nicoll 7d677d066a Merge branch '4.0.x' into 4.1.x 2026-07-24 15:30:44 +02:00
Stéphane Nicoll 648e2fb5f9 Polish deprecation message
Unfortunately it is too late to flag HttpMessageConverters for removal
as it would be a breaking change in a patch release.

See gh-46411
2026-07-24 15:26:50 +02:00
Stéphane Nicoll ca67fcb642 Merge branch '4.1.x'
Closes gh-51122
2026-07-24 15:19:38 +02:00
Stéphane Nicoll 9821dade80 Merge branch '4.0.x' into 4.1.x
Closes gh-51121
2026-07-24 15:19:14 +02:00
Stéphane Nicoll b9ebff0084 Use RestClient in tests and infrastructure code
Closes gh-51120
2026-07-24 15:10:43 +02:00
Stéphane Nicoll 1a42db1d78 Merge branch '4.1.x'
Closes gh-51116
2026-07-24 08:52:44 +02:00
Stéphane Nicoll 8adbbd7a70 Merge branch '4.0.x' into 4.1.x
Closes gh-51115
2026-07-24 08:52:37 +02:00
wantaek 8f832b659b Fix declared type of spring.test.mockmvc.htmlunit.url
The manual metadata entry declares java.lang.Boolean while its
description and default value ("http://localhost") describe a URL
string, and MockMvcWebClientAutoConfiguration and
MockMvcWebDriverAutoConfiguration read the property as a string.

See gh-51110

Signed-off-by: wantaek <wantaekchoi@gmail.com>
2026-07-24 08:51:46 +02:00
Stéphane Nicoll 834203dba5 Merge branch '4.1.x'
Closes gh-51106
2026-07-23 14:23:55 +02:00
Stéphane Nicoll e2b4c93c57 Polish "Honor gRPC overall health setting"
See gh-50799
2026-07-23 14:17:38 +02:00
Ahmed El amraouiyine da318b2540 Honor gRPC overall health setting
See gh-50799

Signed-off-by: Ahmed El amraouiyine <amraouiyine@gmail.com>
2026-07-23 14:16:01 +02:00
Stéphane Nicoll a370fa9e8b Merge branch '4.1.x'
Closes gh-51096
2026-07-22 11:40:43 +02:00
Stéphane Nicoll 7edcc06edb Merge branch '4.0.x' into 4.1.x
Closes gh-51095
2026-07-22 11:40:30 +02:00
Stéphane Nicoll 3d0ec60c8d Fix servlet-api dependency scope for spring-boot-h2-console
Closes gh-51094
2026-07-22 11:40:12 +02:00
Stéphane Nicoll d9b2f9207a Merge branch '4.1.x'
Closes gh-51088
2026-07-21 14:56:15 +02:00
Stéphane Nicoll bce125b7ec Merge branch '4.0.x' into 4.1.x
Closes gh-51087
2026-07-21 14:51:51 +02:00
Manu Sridharan 428806d71f Adapt to improvements in Nullaway 0.13.8
This commit adapts @Nullable when calling Map#remove as it correctly
handles nullability.

See gh-50972

Signed-off-by: Manu Sridharan <msridhar@gmail.com>
2026-07-21 14:45:29 +02:00
Eddú Meléndez 4293de5eee Simplify Artemis AMQP 1.0 integration test
See gh-51081

Signed-off-by: Eddú Meléndez <eddu.melendez@gmail.com>
2026-07-21 08:27:22 +02:00
Stéphane Nicoll 52b8adda3e Merge branch '4.1.x'
Closes gh-50965
2026-07-16 15:39:30 +02:00
Stéphane Nicoll fa6a996372 Merge branch '4.0.x' into 4.1.x
Closes gh-50964
2026-07-16 15:39:21 +02:00
Stéphane Nicoll 9f8f4da563 Polish "Preserve nested Flyway migration paths in native images"
See gh-50433
2026-07-16 15:38:24 +02:00
Dongliang Xie d9ffeee4b7 Preserve nested Flyway migration paths in native images
This commit preserves the classpath-relative path for Flyway migration
discovered by the native image resource provider so nested migrations
remain readable.

See gh-50433

Signed-off-by: Dongliang Xie <dragonfsky@gmail.com>
2026-07-16 15:38:19 +02:00
Brian Clozel 190cc177dd Merge branch '4.1.x'
Closes gh-50962
2026-07-16 14:53:43 +02:00
Brian Clozel 1377c3a1c2 Merge branch '4.0.x' into 4.1.x
Closes gh-50961
2026-07-16 14:53:24 +02:00