-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Fixed authHeader bug #42909
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Fixed authHeader bug #42909
+115,131
−43,608
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
* pr/42718: Fix typos and formatting errors in documentation Closes spring-projectsgh-42718
Extend message source configuration properties and auto-configuration to support common messages. See spring-projectsgh-42472
* pr/42472: Polish 'Allow common messages to be specified for message sources' Allow common messages to be specified for message sources Closes spring-projectsgh-42472
* pr/42682: Strengthen package-like assertions Closes spring-projectsgh-42682
* pr/42874: Add a test to verify that ReflectionHint for Hazelcast ClientConfig is present Closes spring-projectsgh-42874
Rename `RestTemplateBuilder` methods for consistency: * `setConnectTimeout` -> `connectTimeout` * `setReadTimeout` -> `readTimeout` * `setSslBundle` -> `sslBundle` Closes spring-projectsgh-42884
Add a new `ClientHttpRequestFactoryBuilder` interface to support the creation of `ClientHttpRequestFactory` instances. The new code will ultimately replace the existing `ClientHttpRequestFactories` class. The `ClientHttpRequestFactoryBuilder` is a functional interface with additional static factory methods for the various supported `ClientHttpRequestFactory` types. Each type has it's own builder which should allow us to support additional customization in the future. Unlike `ClientHttpRequestFactories`, the builder aligns with Spring Framework defaults and will detect the `JdkClientHttpRequestFactory` in preference of `SimpleClientHttpRequestFactory`. This commit also relocates `ClientHttpRequestFactorySettings` to bring it into the new `http.client` package. See spring-projectsgh-36266
Refactor the internals of `RestTemplateBuilder` so that the new `ClientHttpRequestFactoryBuilder` is used to create `ClientHttpRequestFactory` instance. See spring-projectsgh-36266
Add a `requestFactorySettings` method to `RestTemplateBuilder` to make it easier to apply an existing `ClientHttpRequestFactorySettings` instance. Closes spring-projectsgh-42885
Add a new `WebServiceMessageSenderFactory` factory interface to replace `HttpWebServiceMessageSenderBuilder`. The factory provides a general purpose way of creating `WebServiceMessageSender` instances, but most typically will be `ClientHttpRequestMessageSender` created from a `ClientHttpRequestFactoryBuilder`. A new `httpMessageSenderFactory` method has been added to the `WebServiceTemplateBuilder` class. This allows any sender to be plugged into the template. Closes spring-projectsgh-42886
Add a new `HttpClientAutoConfiguration` class that provides `ClientHttpRequestFactoryBuilder` and `ClientHttpRequestFactorySettings` beans and new configuration properties. The existing `RestTemplate`, `RestClient` and `WebServiceTemplate` auto-configurations have been updated to make use of the new HTTP client support. Users may now set `spring.http.client` property to globally change the `ClientHttpRequestFactory` used in their application. Closes spring-projectsgh-36266
Deprecate `ClientHttpRequestFactories` and refactor its internals to delegate to the new `ClientHttpRequestFactoryBuilder` interface. Closes spring-projectsgh-36266
Update `ClientHttpRequestFactoryBuilder` implementations to ensure that all libraries have consistent redirect follow behavior. Following of redirects is enabled by default. The `ClientHttpRequestFactorySettings` may be used to change if redirects should be followed. The `spring.http.client.redirects` property may also be used to update the default behavior. Closes spring-projectsgh-42879
Update `ClientHttpRequestFactoryBuilder` implementations for `HttpComponents`, `Jdk`, `Jetty` and `Reactor` to allow customization of the underlying components. Closes spring-projectsgh-39035
Update documentation with information on how to configure the HTTP client globally. Closes spring-projectsgh-42888
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Overview of Changes
@JsonIgnore
on variableauthHeader
to avoid auto-serialization.com.fasterxml.jackson.annotation.JsonIgnore
to make annotation valid.Related Issues
Fixed #42905
Type of Change
Impact
Now when class
DockerRegistryUserAuthentication
andDockerRegistryTokenAuthentication
use methodcreateAuthHeader()
would't add"authHeader" : null
field.Test
I've already test the class
DockerRegistryUserAuthentication
andDockerRegistryTokenAuthentication
methodgetAuthHeader()
, but only write rough test code not create a new branch to test. Do I need create a new branch?Effect of Test
it works as expected.
Note
If anything I did worked not as expected, plz contact with me. Finally, looking forward to your reply.