Closed
Description
Brian Clozel opened SPR-15682 and commented
While working on a Spring Boot issue regarding codecs configuration, I've noticed that the reactive server and client codec configurations don't provide the same API.
On the server side, we're dealing with a ServerCodecConfigurer
:
WebFluxConfigurer.configureHttpMessageCodecs(ServerCodecConfigurer configurer)
The client configuration is dealt with ExchangeStrategies
, which declares:
ExchangeStrategies.defaultCodecs(Consumer<ClientCodecConfigurer.ClientDefaultCodecs> consumer);
ExchangeStrategies.customCodecs(Consumer<CodecConfigurer.CustomCodecs> consumer);
Those methods provide extension points that aren't aligned with the server side.
To better align those configurations and allow code reuse in the infrastructure setup, I'd like to add the following (and remove the existing ones?):
// both ClientCodecConfigurer and ServerCodecConfigurer extend CodecConfigurer
ExchangeStrategies.codecs(Consumer<ClientCodecConfigurer> consumer)
Affects: 5.0 RC2
Reference URL: spring-projects/spring-boot#9166
Referenced from: commits 52148a1