Class JacksonXmlDecoder
java.lang.Object
org.springframework.http.codec.JacksonCodecSupport<tools.jackson.dataformat.xml.XmlMapper>
org.springframework.http.codec.AbstractJacksonDecoder<tools.jackson.dataformat.xml.XmlMapper>
org.springframework.http.codec.xml.JacksonXmlDecoder
- All Implemented Interfaces:
org.springframework.core.codec.Decoder<Object>, HttpMessageDecoder<Object>
public class JacksonXmlDecoder
extends AbstractJacksonDecoder<tools.jackson.dataformat.xml.XmlMapper>
Decode bytes into XML and convert to Objects with Jackson 3.x.
Stream decoding is currently not supported.
- Since:
- 7.0.3
- Author:
- Sebastien Deleuze
- See Also:
-
Field Summary
Fields inherited from class JacksonCodecSupport
FILTER_PROVIDER_HINT, JSON_VIEW_HINT, logger, mapperRegistrations -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new instance with aXmlMappercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader).JacksonXmlDecoder(tools.jackson.dataformat.xml.XmlMapper mapper) Construct a new instance with the providedXmlMapper.JacksonXmlDecoder(tools.jackson.dataformat.xml.XmlMapper.Builder builder) Construct a new instance with the providedXmlMapper.Buildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader).JacksonXmlDecoder(tools.jackson.dataformat.xml.XmlMapper.Builder builder, org.springframework.util.MimeType... mimeTypes) Construct a new instance with the providedXmlMapper.Buildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader), andMimeTypes.JacksonXmlDecoder(tools.jackson.dataformat.xml.XmlMapper mapper, org.springframework.util.MimeType... mimeTypes) Construct a new instance with the providedXmlMapperandMimeTypes. -
Method Summary
Modifier and TypeMethodDescriptiondecode(Publisher<org.springframework.core.io.buffer.DataBuffer> input, org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String, Object> hints) static tools.jackson.dataformat.xml.XmlFactoryReturn anXmlFactorycreated fromStaxUtils.createDefensiveInputFactory()with Spring's defensive setup, i.e.Methods inherited from class AbstractJacksonDecoder
canDecode, customizeReader, decode, decodeToMono, getAnnotation, getDecodableMimeTypes, getDecodableMimeTypes, getDecodeHints, getMaxInMemorySize, processInput, setMaxInMemorySizeMethods inherited from class JacksonCodecSupport
getHints, getJavaType, getMapper, getMapperRegistrations, getMappersForType, getMediaTypesForProblemDetail, getMimeTypes, getMimeTypes, getParameter, registerMappersForType, selectMapper, supportsMimeType
-
Constructor Details
-
JacksonXmlDecoder
public JacksonXmlDecoder()Construct a new instance with aXmlMappercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader). -
JacksonXmlDecoder
public JacksonXmlDecoder(tools.jackson.dataformat.xml.XmlMapper.Builder builder) Construct a new instance with the providedXmlMapper.Buildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader).- See Also:
-
JacksonXmlDecoder
public JacksonXmlDecoder(tools.jackson.dataformat.xml.XmlMapper mapper) Construct a new instance with the providedXmlMapper.- See Also:
-
JacksonXmlDecoder
public JacksonXmlDecoder(tools.jackson.dataformat.xml.XmlMapper.Builder builder, org.springframework.util.MimeType... mimeTypes) Construct a new instance with the providedXmlMapper.Buildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader), andMimeTypes.- See Also:
-
JacksonXmlDecoder
public JacksonXmlDecoder(tools.jackson.dataformat.xml.XmlMapper mapper, org.springframework.util.MimeType... mimeTypes) Construct a new instance with the providedXmlMapperandMimeTypes.- See Also:
-
-
Method Details
-
decode
public Flux<Object> decode(Publisher<org.springframework.core.io.buffer.DataBuffer> input, org.springframework.core.ResolvableType elementType, @Nullable org.springframework.util.MimeType mimeType, @Nullable Map<String, Object> hints) - Specified by:
decodein interfaceorg.springframework.core.codec.Decoder<Object>- Overrides:
decodein classAbstractJacksonDecoder<tools.jackson.dataformat.xml.XmlMapper>
-
defensiveXmlFactory
public static tools.jackson.dataformat.xml.XmlFactory defensiveXmlFactory()Return anXmlFactorycreated fromStaxUtils.createDefensiveInputFactory()with Spring's defensive setup, i.e. no support for the resolution of DTDs and external entities.
-