Commit Graph
32 Commits
Author SHA1 Message Date
Stéphane Nicoll d2f0b8b339 Merge branch '4.0.x' into 4.1.x
Closes gh-51513
2026-08-30 20:27:47 +02:00
Stéphane Nicoll 60445a5069 Polish "Fix null customizer checks in HTTP client builders"
See gh-51509
2026-08-30 20:21:43 +02:00
kdomo 93a24eabb1 Fix null customizer checks in HTTP client builders
AbstractClientHttpRequestFactoryBuilder.mergedCustomizers and its
reactive counterpart asserted on the customizers field rather than
the customizer parameter. The field is never null since the
constructor defaults it to an empty list, so the assertion always
passed and a null customizer was not rejected.

See gh-51509

Signed-off-by: kdomo <dongho5088@naver.com>
2026-08-30 20:16:15 +02:00
Dependabot Standalone 739daa7ba8 Filter special purpose IPs (RFC 6890) in externalAddresses()
Update `InetAddressFilter.externalAddresses()` to filter special purpose
IP addresses as defined by RFC 6890. As a byproduct of this commit to
additional factory methods (`specialPurpose()` and `multicast()`) have
also been introduced.

Closes gh-50668
2026-06-02 09:52:02 -07:00
Phillip Webb f651030f9b Align HttpClient defaults with Spring Framework and provide an opt-out
Update default for `ReactorClientHttpRequestFactoryBuilder` and
`ReactorClientHttpConnectorBuilder` to align with Spring Framework.

Also provide method of opting out in case proxyWithSystemProperties is
not wanted.

Closes gh-49950
2026-04-21 22:25:14 -07:00
Phillip Webb 52cef18686 Support InetAddress filtering for HTTP Clients
Add `InetAddressFilter` interface which can be provided by
`HttpSettings` to filter out addresses in order to harden
applications against SSRF attacks.

Closes gh-49687
2026-04-13 22:03:50 -07:00
Andy Wilkinson 5721f57acd Polish "Update TestRestTemplate's default cookie handling to match RestTemplate's"
See gh-49261

Signed-off-by: Andy Wilkinson <andy.wilkinson@broadcom.com>
2026-03-12 13:05:21 +00:00
Apoorv Darshan 085d522570 Update TestRestTemplate's default cookie handling to match RestTemplate's
See gh-49261

Signed-off-by: Apoorv Darshan <ad13dtu@gmail.com>
2026-03-12 12:13:27 +00:00
Andy Wilkinson 20ff2b7ff1 Register reflection hints for HTTP service client property binding
Fixes gh-49274
2026-02-25 15:12:55 +00:00
Phillip Webb 70ce043f80 Bind HttpServiceClientProperties directly
Update `HttpServiceClientProperties` to use direct binding rather than
using `@ConfigurationProperties`. The prevents metadata and IDE issues
and also allows the class API to be simplified.

Closes gh-48616
2026-01-07 17:39:56 -08:00
Stéphane Nicoll 971bd500d4 Polish "Add missing HttpClientSettingsPropertyMapper tests"
See gh-48145
2025-11-17 09:53:41 +01:00
Steve Armstrong 82fe577596 Add missing HttpClientSettingsPropertyMapper tests
See gh-48145

Signed-off-by: Steve Armstrong <stevearmstrong-dev@users.noreply.github.com>
2025-11-17 09:44:12 +01:00
Stéphane Nicoll 00f60da0de Start building against Spring Framework 7.0.0 snapshots
See gh-47825
2025-11-11 10:22:06 +00:00
Phillip Webb 00bd0efc56 Merge branch '3.5.x'
Closes gh-47946
2025-11-04 15:36:55 -08:00
Phillip Webb 7849474291 Merge branch '3.5.x'
Closes gh-47924
2025-11-03 20:41:23 -08:00
Moritz Halbritter 1da46813b8 Merge branch '3.5.x'
Closes gh-47679
2025-10-17 14:46:40 +02:00
Phillip Webb 94199a63fa Change 'blocking' term to 'imperative'
Closes gh-47398
2025-10-15 13:11:10 -07:00
Phillip Webb 02b2d03acf Rationalize HTTP client configuration properties
Simplify HTTP client configuration properties by sharing common
settings for both blocking and reactive clients.

The `ClientHttpRequestFactorySettings` and `ClientHttpConnectorSettings`
have been merged to a single `HttpClientSettings` class. Properties
to configure common settings are available under:

	`spring.http.clients`

Blocking and reactive settings have been moved to
`spring.http.clients.blocking` and `spring.http.clients.reactive`. With
currently only the factory/connector being configurable.

HTTP Service Client properties have also been rationalized under a
`spring.http.serviceclient.<group-name>`. Support for properties that
apply to all service clients and all Rest/Web Clients have been removed.

Support for `ApiVerionInserter` beans has also been removed in favor of
configuring the service group or builders directly.

Closes gh-47398
2025-10-09 22:18:53 -07:00
Moritz Halbritter 2ca6703f55 Add nullability annotations to tests in module/spring-boot-http-client
See gh-47263
2025-10-06 12:03:55 +02:00
Phillip Webb 255ea92a57 Add HttpClientTransport factory support
Update `JettyClientHttpRequestFactoryBuilder` and
`JettyClientHttpConnectorBuilder` with support for create the
`HttpClientTransport` from a factory function.

Closes gh-47251
2025-09-18 14:02:18 -07:00
Phillip Webb 336e7de9fc Add with methods to apply pre-packaged customizations
Add `with` methods to `HttpRequestFactoryBuilder` and
`ClientHttpConnectorBuilder` that operate in a similar way to the
`WebClient.Builder.apply(...)` method.

Closes gh-47205
2025-09-15 16:45:10 -07:00
Stéphane Nicoll 6207e41473 Remove auto-configuration support for '@HttpServiceClient'
This reverts commit 7a8b337b1c.

Closes gh-47123
2025-09-08 16:13:38 +02:00
Phillip WebbandMoritz Halbritter 239f384ac0 Update PropertyMapper to better support nullability
Refactor `PropertyMapper` so that it no longer calls adapter or
predicate methods by default when the source value is `null`. This
effectively makes all default calls the same as using
`alwaysWhenNotNull` in the previous generation of the code.

For the limited times when you do need to deal with `null` values, the
new `always()` method can be used.

For example,

	map.from(source::method).to(destination::method);

Will not call `destination.method(...)` if `source.method()` returns
`null`.

Where as:

	map.from(source::method).always().to(destination::method);

Will call  `destination.method(null)` if `source.method()` returns
`null`.

This update provides clearer semantics for the API and allows for better
JSpecify nullability annotations. It has also simplified much of our
existing property mapper code.

Closes gh-47024

Co-authored-by: Moritz Halbritter <moritz.halbritter@broadcom.com>
2025-09-05 14:43:33 -07:00
Moritz Halbritter 63adb82145 Merge branch '3.5.x'
Closes gh-47055
2025-09-05 14:17:39 +02:00
Phillip Webb 7140be8751 Rename metrics, observation, and tracing modules
Rename modules to include 'micrometer'.

Closes gh-46925
2025-08-20 16:05:11 -07:00
Phillip Webb 09eac5f7b4 Polish 'Support virtual threading with JDK HTTP clients'
See gh-46404
2025-08-19 22:26:39 -07:00
Phillip Webb 7098c8e766 Fix types used in connector tests 2025-08-19 21:35:30 -07:00
Phillip Webb 7a8b337b1c Add @HttpServiceClient scanning auto-configuration
Refactor `HttpServiceClientAutoConfiguration` and
`ReactiveHttpServiceClientAutoConfiguration` to support scanning for
`@HttpServiceClient` annotated interfaces.

Closes gh-46782
2025-08-15 18:48:38 -07:00
Stéphane Nicoll d5f7423ba2 Merge branch '3.5.x'
Closes gh-46684
2025-08-06 16:43:29 +02:00
Phillip Webb dba148ea37 Adapt to upstream API version updates
Closes gh-46519
2025-07-31 17:51:44 +01:00
Phillip Webb 707388beff Add API versioning auto-configuration and properties support
Update `RestClient`, `WebClient`, Spring MVC and Spring WebFlux
auto-configuration to support API versioning.

Closes gh-46519
2025-07-30 15:58:23 +01:00
Phillip Webb decc32dde3 Restructure project directories to better fit Gradle
Closes gh-46358
2025-07-10 17:54:08 -07:00