Class XmlMapperFactory
java.lang.Object
io.micronaut.xml.jackson.server.convert.XmlMapperFactory
Factory bean for creating the Jackson
XmlMapper
.
The factory mostly duplicates ObjectMapperFactory
with the only difference that it creates
object mappers dedicated for xml processing and avoid some json specific configuration that might have been done inside
of ObjectMapperFactory
.- Since:
- 1.0.0
- Author:
- Sergey Vishnyakov
-
Field Summary
Modifier and TypeFieldDescriptionprotected com.fasterxml.jackson.databind.deser.BeanDeserializerModifier[]
protected com.fasterxml.jackson.databind.ser.BeanSerializerModifier[]
protected io.micronaut.core.convert.ConversionService
protected com.fasterxml.jackson.databind.JsonDeserializer[]
protected com.fasterxml.jackson.databind.Module[]
protected com.fasterxml.jackson.databind.KeyDeserializer[]
protected com.fasterxml.jackson.databind.JsonSerializer[]
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncom.fasterxml.jackson.dataformat.xml.XmlMapper
xmlMapper
(@Nullable io.micronaut.jackson.JacksonConfiguration jacksonConfiguration, @Nullable JacksonXmlConfiguration xmlConfiguration) Builds the core JacksonObjectMapper
from the optional configuration andJsonFactory
.
-
Field Details
-
conversionService
@Inject protected io.micronaut.core.convert.ConversionService conversionService -
jacksonModules
@Inject protected com.fasterxml.jackson.databind.Module[] jacksonModules -
serializers
@Inject protected com.fasterxml.jackson.databind.JsonSerializer[] serializers -
deserializers
@Inject protected com.fasterxml.jackson.databind.JsonDeserializer[] deserializers -
beanSerializerModifiers
@Inject protected com.fasterxml.jackson.databind.ser.BeanSerializerModifier[] beanSerializerModifiers -
beanDeserializerModifiers
@Inject protected com.fasterxml.jackson.databind.deser.BeanDeserializerModifier[] beanDeserializerModifiers -
keyDeserializers
@Inject protected com.fasterxml.jackson.databind.KeyDeserializer[] keyDeserializers
-
-
Constructor Details
-
XmlMapperFactory
public XmlMapperFactory()
-
-
Method Details
-
xmlMapper
@Singleton @Named("xml") public com.fasterxml.jackson.dataformat.xml.XmlMapper xmlMapper(@Nullable @Nullable io.micronaut.jackson.JacksonConfiguration jacksonConfiguration, @Nullable @Nullable JacksonXmlConfiguration xmlConfiguration) Builds the core JacksonObjectMapper
from the optional configuration andJsonFactory
.- Parameters:
jacksonConfiguration
- The configurationxmlConfiguration
- The XML configuration- Returns:
- The
ObjectMapper
-