Consistently use CodecConfigurer for configuration

This commit changes the `ExchangeStrategies` and `HandlerStrategies`
interfaces to consistently use the `CodecConfigurer` (and
sub-interfaces) for configuring codecs on the server and on the client.

Issue: SPR-15682
This commit is contained in:
Brian Clozel
2017-06-19 18:42:37 +02:00
parent 018cc45483
commit 52148a10b7
5 changed files with 14 additions and 57 deletions

View File

@@ -48,7 +48,8 @@ import org.springframework.web.reactive.function.BodyInserter;
import org.springframework.web.reactive.result.view.ViewResolver;
import static java.nio.charset.StandardCharsets.UTF_8;
import static org.junit.Assert.*;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertSame;
/**
* @author Arjen Poutsma
@@ -203,10 +204,6 @@ public class DefaultEntityResponseBuilderTests {
return Collections.<ViewResolver>emptyList();
}
};
HandlerStrategies strategies = HandlerStrategies.empty()
.customCodecs(configurer -> configurer.writer(new EncoderHttpMessageWriter<>(CharSequenceEncoder.allMimeTypes())))
.build();
StepVerifier.create(result)
.consumeNextWith(response -> {
StepVerifier.create(response.entity())