use of org.springframework.core.codec.ResourceDecoder in project spring-framework by spring-projects.
the class WebFluxConfigurationSupport method addDefaultHttpMessageReaders.
/**
* Adds default converters that sub-classes can call from
* {@link #configureMessageReaders(List)} for {@code byte[]},
* {@code ByteBuffer}, {@code String}, {@code Resource}, JAXB2, and Jackson
* (if present on the classpath).
*/
protected final void addDefaultHttpMessageReaders(List<HttpMessageReader<?>> readers) {
readers.add(new DecoderHttpMessageReader<>(new ByteArrayDecoder()));
readers.add(new DecoderHttpMessageReader<>(new ByteBufferDecoder()));
readers.add(new DecoderHttpMessageReader<>(new DataBufferDecoder()));
readers.add(new DecoderHttpMessageReader<>(new StringDecoder()));
readers.add(new DecoderHttpMessageReader<>(new ResourceDecoder()));
if (jaxb2Present) {
readers.add(new DecoderHttpMessageReader<>(new Jaxb2XmlDecoder()));
}
if (jackson2Present) {
readers.add(new Jackson2ServerHttpMessageReader(new DecoderHttpMessageReader<>(new Jackson2JsonDecoder())));
}
}
Aggregations