Commit Graph

2015 Commits

Author SHA1 Message Date
Sébastien Deleuze
9d768a89d2 Make ReactorClientHttpConnector lifecycle-aware
With this commit, ReactorClientHttpConnector now implements
SmartLifecycle which optionally allows recreating the HttpClient
after ReactorResourceFactory has been updated.

Closes gh-31180
2023-09-06 17:48:22 +02:00
Sébastien Deleuze
ab2ad746b5 Polish ReactorResourceFactoryTests
See gh-31178
2023-09-06 16:01:06 +02:00
Sébastien Deleuze
125b8e7418 Make ReactorResourceFactory lifecycle-aware
With this commit, ReactorResourceFactory now implements
Lifecycle which allows supporting JVM Checkpoint Restore
in Spring Boot with Reactor Netty server, and helps
to support Reactor Netty client as well.

Closes gh-31178
2023-09-06 14:14:07 +02:00
Sébastien Deleuze
2a916a3869 Polish ReactorResourceFactoryTests 2023-09-06 14:14:07 +02:00
rstoyanchev
b068742ec8 Support method validation for Lists in WebMvc and WebFlux
Closes gh-31120
2023-09-04 13:22:09 +01:00
Arjen Poutsma
6597727c86 Upgrade to Jetty 12
This commit upgrades Spring Framework to Jetty 12.0.1, and Reactive HTTP
 Client 4.0.0.

Closes gh-30698
2023-09-04 14:03:29 +02:00
Brian Clozel
5fb567a37e Fix missing URI template from client observations in ResTemplateAdapter
Prior to this commit, the `RestTemplateAdapter` would manually expand
templated URIs. This means that the `RestTemplate` instance itself would
never see the templated URIs and could not record it in the client
observations at runtime.

This commit ensures that when URI templates are available, the adapter
uses the correct `exchange` method variant.

Fixes gh-31144
2023-09-04 11:45:35 +02:00
Anna Buyevich
376a8989f5 Add more tests to DefaultClientRequestObservationConvention
Closes gh-31125
2023-08-29 14:09:46 +02:00
Sébastien Deleuze
499f57ebc5 Fix formatting errors 2023-08-28 10:12:45 +02:00
Sébastien Deleuze
349674ef5e Adapt tests for Jackson ParameterNamesModule
Closes gh-27511
2023-08-28 09:39:53 +02:00
Sam Kruglov
2f43f77dd1 Add ParameterNamesModule to "well known" jackson modules
See gh-27511
2023-08-28 09:36:36 +02:00
Sam Brannen
4e2d9252e5 Allow component name to be specified in @[Rest]ControllerAdvice
This commit builds on the recently added support for using @AliasFor to
override the `value` attribute in `@Component, and allows a custom
component name to be specified in both @ControllerAdvice and
@RestControllerAdvice via new `name` attributes.

See gh-31089
Closes gh-21108
2023-08-27 18:06:08 +02:00
Sam Brannen
e0c3b1ae1d Merge branch '6.0.x' 2023-08-26 15:28:50 +02:00
Sam Brannen
7598bca799 Revise Checkstyle rules to prohibit use of assertions other than AssertJ
Closes gh-31116
2023-08-26 15:28:25 +02:00
Brian Clozel
35fc2df948 Instrument RestClient for Observability
This commit instruments the new `RestClient` HTTP client for
observability. Since this client is sharing its HTTP infrastructure with
`RestTemplate` and operates on the same request/response types, this
instrumentation reuses the Observation convention and context.
This choice makes sense since one can build a new `RestClient` instance
using a `RestTemplate` instance, effectively reusing the underlying
configuration.

Closes gh-31114
2023-08-25 16:23:04 +02:00
Stephane Nicoll
4695bd332a Polish "Get content as String for ContentCachingRequestWrapper"
See gh-30709
2023-08-22 19:11:26 +02:00
Sam Brannen
9908967954 Merge branch '6.0.x' 2023-08-04 15:55:59 +03:00
Sam Brannen
169392e132 Polish StringHttpMessageConverterTests 2023-08-04 15:53:37 +03:00
Sam Brannen
c050642290 Polish contribution
See gh-30942
2023-08-04 15:50:07 +03:00
Patrick Strawderman
7636eecb48 Use readNBytes in StringHttpMessageConverter when contentLength is available
When the content length is known, use readNBytes on the InputStream in
StringHttpMessageConverter, which avoids some extra copying and allocations.

Closes gh-30942
2023-08-04 15:43:10 +03:00
Sam Brannen
170d6bfdad Clean up warnings in tests 2023-07-31 16:17:48 +03:00
Arjen Poutsma
efb6abc43f Deprecate OkHttp3ClientHttpRequestFactory
Closes gh-30919
2023-07-20 13:48:52 +02:00
Sam Brannen
a34f9fa66c Update copyright headers 2023-07-15 13:10:46 +02:00
Sam Brannen
63fe45d92a Update copyright headers 2023-07-15 13:11:29 +02:00
Sam Brannen
5ce8ffd197 Merge branch '6.0.x' 2023-07-15 13:11:03 +02:00
rstoyanchev
793581ebde Add ForwardedHeaderUtils
Closes gh-30886
2023-07-13 18:12:30 +01:00
Sam Brannen
16b9640af2 Merge branch '6.0.x' 2023-07-12 11:50:11 +02:00
Sam Brannen
68f2b0ca59 Rely on auto-boxing in tests 2023-07-12 11:49:02 +02:00
rstoyanchev
57ed5bf34b Polishing contribution
Closes gh-30869
2023-07-11 19:13:22 +01:00
Olga MaciaszekSharma
8b77ed164d Add RestClientAdapter
See gh-30869
2023-07-11 19:13:22 +01:00
rstoyanchev
a3e37597aa Add ReactiveHttpRequestValues
Separate collection and handling of reactive request values into a
subclass of HttpRequestValues.

Closes gh-30117
2023-07-11 07:42:04 +01:00
Rossen Stoyanchev
22376c2efa Polishing
See gh-30117
2023-07-10 11:24:30 +01:00
rstoyanchev
47667ab990 Collapse hierarchy under HttpServiceMethodTests
See gh-30117
2023-07-10 10:56:32 +01:00
Rossen Stoyanchev
068dc7db28 Remove use of TestHttpClientAdapter
Now that HttpClientAdapter is deprecated and replaced by HttpExchangeAdapter
and ReactorHttpExchangeAdapter, our tests should use the new contracts.

See gh-30117
2023-07-10 10:36:16 +01:00
rstoyanchev
3be4c0a893 Replace Void with void on exchange method
See gh-30117
2023-07-10 09:10:14 +01:00
Olga MaciaszekSharma
268f3c853e Add RestTemplate support for HTTP interface client
See gh-30117
2023-07-06 19:07:40 +02:00
Juergen Hoeller
062d701ae1 Consistently use mutable ArrayList for modulesToInstall vs modules
Closes gh-30751
2023-06-26 12:34:54 +02:00
Arjen Poutsma
20dd66cd5a Introduce ReactorNettyClientRequestFactory
This commit introduces an implementation of ClientHttpRequestFactory
based on Reactor Netty's HttpClient.

Closes gh-30835
2023-07-07 15:30:53 +02:00
Arjen Poutsma
68b5eedde1 Change OutputStreamPublisher default chunk size
This commit set the default chunk size to 1024 (from 8192).
2023-07-06 12:01:24 +02:00
Arjen Poutsma
3d2befc84a Rearrange HttpHeaders adapters
This commit moves HttpHeaders that are used in multiple places (client
and server, reactive and non-reactive) to a new, separate http.support
package.

Closes gh-30823
2023-07-06 11:00:26 +02:00
Sam Brannen
368a917466 Polish RestClient, etc. 2023-07-05 15:22:27 +02:00
Arjen Poutsma
a6c5692586 Make OutputStreamPublisher more generic
This commit improves the OutputStreamPublisher so that it is capable
of publishing other types that ByteBuffers.
2023-07-05 15:20:43 +02:00
rstoyanchev
deaa493644 Add Visitor to HandlerMethodValidationException
Closes gh-30813
2023-07-04 17:19:58 +01:00
Arjen Poutsma
0820210c7c Introduce RestClient
This commit introduces the RestClient, a synchronous HTTP client that
offers an API similar to WebClient, using the same infrastructure (i.e.
request factory, error handler, interceptors, etc) as RestTemplate.

Closes gh-29552
2023-07-04 10:27:58 +02:00
rstoyanchev
592ab0f350 Add ~.validation.method package
Extract classes from ~.validation.beanvalidation without a direct
dependency on beanvalidation.

See gh-30644
2023-07-03 15:05:51 +01:00
rstoyanchev
7a79da589a Add default web handling of method validation errors
Closes gh-30644
2023-07-03 12:08:11 +01:00
Rossen Stoyanchev
ba4d9a5230 Add BindErrorUtils
This deprecates static methods in MethodArgumentNotValidException
which is not a great vehicle for such methods.

See gh-30644
2023-07-03 12:08:11 +01:00
Arjen Poutsma
46f1849c2f Polishing external contribution
See gh-30787
Closes gh-30788
2023-07-03 12:36:25 +02:00
spencergibb
9900575f9c Allow customization of disallowed JdkClientHttpRequest headers
By default, the JDK HttpClient's HttpRequest does not allow Connection,
Content-Length, Expect, Host, or Upgrade headers to be set, but this can
be overriden with the `jdk.httpclient.allowRestrictedHeaders` system
property.

See https://bugs.openjdk.org/browse/JDK-8213696

Closes gh-30787
2023-07-03 12:35:44 +02:00
Johnny Lim
41f8b6926f Polish gh-30013
See gh-30013
2023-06-30 14:02:15 +02:00