Skip to content
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

Allow ExchangeStrategies customizations in WebClient #24106

Closed
spring-projects-issues opened this issue Nov 29, 2019 · 3 comments
Closed

Allow ExchangeStrategies customizations in WebClient #24106

spring-projects-issues opened this issue Nov 29, 2019 · 3 comments
Assignees
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: backport An issue that is a backport of another issue to a maintenance branch type: enhancement A general enhancement
Milestone

Comments

@spring-projects-issues
Copy link
Collaborator

Backport of gh-23961

@spring-projects-issues spring-projects-issues added type: backport An issue that is a backport of another issue to a maintenance branch type: enhancement A general enhancement labels Nov 29, 2019
@spring-projects-issues spring-projects-issues added this to the 5.1.12 milestone Nov 29, 2019
@bclozel bclozel self-assigned this Nov 29, 2019
bclozel added a commit that referenced this issue Nov 29, 2019
Prior to this commit, developers could configure their WebClient to use
their custom `ExchangeStrategies`, by providing it in the
`WebClient.Builder` chain.
Once created, an `ExchangeStrategies` instance is not mutable, which
makes it hard for further customizations by other components. In the
case of the reported issue, other components would override the default
configuration for the codecs maxInMemorySize.

This commit makes the `ExchangeStrategies` mutable and uses that fact to
further customize them with a new `WebClient.Builder#exchangeStrategies`
`Consumer` variant. This commit is also deprecating those mutating
variants in favor of a new `WebClient.Builder#exchangeStrategies` that
takes a `ExchangeStrategies#Builder` directly and avoids mutation issues
altogether.

Closes gh-24106
@spring-projects-issues
Copy link
Collaborator Author

Fixed via 43e047c

@jhoeller jhoeller added the in: web Issues in web modules (web, webmvc, webflux, websocket) label Nov 30, 2019
@bclozel
Copy link
Member

bclozel commented Dec 2, 2019

This change is breaking integrations with other projects. Reverting for now and rescheduling to another version.

@spring-projects-issues
Copy link
Collaborator Author

Fixed via 83683a1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in: web Issues in web modules (web, webmvc, webflux, websocket) type: backport An issue that is a backport of another issue to a maintenance branch type: enhancement A general enhancement
Projects
None yet
Development

No branches or pull requests

4 participants