Class JacksonYamlHttpMessageConverter
java.lang.Object
org.springframework.http.converter.AbstractHttpMessageConverter<Object>
org.springframework.http.converter.AbstractSmartHttpMessageConverter<Object>
org.springframework.http.converter.AbstractJacksonHttpMessageConverter
org.springframework.http.converter.yaml.JacksonYamlHttpMessageConverter
- All Implemented Interfaces:
HttpMessageConverter<Object>
,SmartHttpMessageConverter<Object>
Implementation of
HttpMessageConverter
that can read and write the YAML
data format using
the dedicated Jackson 3.x extension.
By default, this converter supports the MediaType.APPLICATION_YAML_VALUE
media type. This can be overridden by setting the supportedMediaTypes
property.
The default constructor loads JacksonModule
s
found by MapperBuilder.findModules(ClassLoader)
.
- Since:
- 7.0
- Author:
- Sebastien Deleuze
-
Field Summary
Fields inherited from class org.springframework.http.converter.AbstractJacksonHttpMessageConverter
defaultObjectMapper
Fields inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
logger
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new instance with aYAMLMapper
customized with theJacksonModule
s found byMapperBuilder.findModules(ClassLoader)
.JacksonYamlHttpMessageConverter
(tools.jackson.dataformat.yaml.YAMLMapper mapper) Construct a new instance with the providedYAMLMapper
. -
Method Summary
Methods inherited from class org.springframework.http.converter.AbstractJacksonHttpMessageConverter
canRead, canWrite, customizeReader, customizeWriter, getCharset, getJavaType, getJsonEncoding, getMediaTypesForProblemDetail, getObjectMapper, getObjectMappersForType, getSupportedMediaTypes, read, readInternal, registerObjectMappersForType, setSupportedMediaTypes, supportsRepeatableWrites, writeInternal, writePrefix, writeSuffix
Methods inherited from class org.springframework.http.converter.AbstractSmartHttpMessageConverter
canWrite, supports, write, writeInternal
Methods inherited from class org.springframework.http.converter.AbstractHttpMessageConverter
addDefaultHeaders, canRead, canRead, canWrite, getContentLength, getDefaultCharset, getDefaultContentType, getSupportedMediaTypes, read, setDefaultCharset, write
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.http.converter.HttpMessageConverter
getSupportedMediaTypes
Methods inherited from interface org.springframework.http.converter.SmartHttpMessageConverter
canRead, read, write
-
Constructor Details
-
JacksonYamlHttpMessageConverter
public JacksonYamlHttpMessageConverter()Construct a new instance with aYAMLMapper
customized with theJacksonModule
s found byMapperBuilder.findModules(ClassLoader)
. -
JacksonYamlHttpMessageConverter
public JacksonYamlHttpMessageConverter(tools.jackson.dataformat.yaml.YAMLMapper mapper) Construct a new instance with the providedYAMLMapper
.- See Also:
-