Class JacksonXmlHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<Object>
org.springframework.http.converter.AbstractSmartHttpMessageConverter<Object>
org.springframework.http.converter.AbstractJacksonHttpMessageConverter<tools.jackson.dataformat.xml.XmlMapper>
org.springframework.http.converter.xml.JacksonXmlHttpMessageConverter
- All Implemented Interfaces:
- HttpMessageConverter<Object>, SmartHttpMessageConverter<Object>
public class JacksonXmlHttpMessageConverter
extends AbstractJacksonHttpMessageConverter<tools.jackson.dataformat.xml.XmlMapper>
Implementation of 
HttpMessageConverter
that can read and write XML using 
Jackson 3.x extension component for reading and writing XML encoded data.
By default, this converter supports application/xml, text/xml, and
application/*+xml with UTF-8 character set. This can be overridden by
setting the supportedMediaTypes property.
The following hint entries are supported:
- A JSON view with a com.fasterxml.jackson.annotation.JsonViewkey and the class name of the JSON view as value.
- A filter provider with a tools.jackson.databind.ser.FilterProviderkey and the filter provider class name as value.
- Since:
- 7.0
- Author:
- Sebastien Deleuze
- 
Field SummaryFields inherited from class AbstractJacksonHttpMessageConverterdefaultMapperFields inherited from class AbstractHttpMessageConverterlogger
- 
Constructor SummaryConstructorsConstructorDescriptionConstruct a new instance with anXmlMappercreated fromdefensiveXmlFactory()and customized with theJacksonModules found byMapperBuilder.findModules(ClassLoader)andProblemDetailJacksonXmlMixin.JacksonXmlHttpMessageConverter(tools.jackson.dataformat.xml.XmlMapper xmlMapper) Construct a new instance with the providedXmlMapper.JacksonXmlHttpMessageConverter(tools.jackson.dataformat.xml.XmlMapper.Builder builder) Construct a new instance with the providedbuildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader)andProblemDetailJacksonXmlMixin.
- 
Method SummaryModifier and TypeMethodDescriptionstatic tools.jackson.dataformat.xml.XmlFactoryReturn anXmlFactorycreated fromStaxUtils.createDefensiveInputFactory()with Spring's defensive setup, i.e.Return the supported media type(s) forProblemDetail.Methods inherited from class AbstractJacksonHttpMessageConvertercanRead, canWrite, customizeReader, customizeWriter, getCharset, getJavaType, getJsonEncoding, getMapper, getMappersForType, getSupportedMediaTypes, read, readInternal, registerMappersForType, setSupportedMediaTypes, supportsRepeatableWrites, writeInternal, writePrefix, writeSuffixMethods inherited from class AbstractSmartHttpMessageConvertercanWrite, supports, write, writeInternalMethods inherited from class AbstractHttpMessageConverteraddDefaultHeaders, canRead, canRead, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, writeMethods inherited from class Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface HttpMessageConvertergetSupportedMediaTypesMethods inherited from interface SmartHttpMessageConvertercanRead, read, write
- 
Constructor Details- 
JacksonXmlHttpMessageConverterpublic JacksonXmlHttpMessageConverter()Construct a new instance with anXmlMappercreated fromdefensiveXmlFactory()and customized with theJacksonModules found byMapperBuilder.findModules(ClassLoader)andProblemDetailJacksonXmlMixin.
- 
JacksonXmlHttpMessageConverterpublic JacksonXmlHttpMessageConverter(tools.jackson.dataformat.xml.XmlMapper.Builder builder) Construct a new instance with the providedbuildercustomized with theJacksonModules found byMapperBuilder.findModules(ClassLoader)andProblemDetailJacksonXmlMixin.- See Also:
 
- 
JacksonXmlHttpMessageConverterpublic JacksonXmlHttpMessageConverter(tools.jackson.dataformat.xml.XmlMapper xmlMapper) Construct a new instance with the providedXmlMapper.- See Also:
 
 
- 
- 
Method Details- 
defensiveXmlFactorypublic 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.
- 
getMediaTypesForProblemDetailDescription copied from class:AbstractJacksonHttpMessageConverterReturn the supported media type(s) forProblemDetail. By default, an empty list, unless overridden in subclasses.- Overrides:
- getMediaTypesForProblemDetailin class- AbstractJacksonHttpMessageConverter<tools.jackson.dataformat.xml.XmlMapper>
 
 
-