-
Notifications
You must be signed in to change notification settings - Fork 41.2k
Auto-configure WebClient #8630
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
Comments
I gave some thoughts to that one. If we want to make things consistent, we probably need a I don't think we have custom converters support at the moment. When is that scheduled @bclozel ? |
|
Please also take the WebTestClient into account. I expected, that the WebTestClient uses the autoconfigured Currently adding a new Jackson module to the WebTestClient is a bit tedious and renders the preconfigured WebTestClient useless. my current solution: @Autowired
private ObjectMapper mapper;
...
webClient = WebTestClient.bindToServer()
.baseUrl("http://localhost:" + port)
.exchangeStrategies(ExchangeStrategies.builder().defaultCodecs((configurer) -> {
configurer.jackson2Decoder(new Jackson2JsonDecoder(mapper));
configurer.jackson2Encoder(new Jackson2JsonEncoder(mapper));
}).build())
.build(); |
We need a
WebClient
story to replaceRestTemplate
in the reactive world.The text was updated successfully, but these errors were encountered: