Class XmlMapperFactory

java.lang.Object
io.micronaut.xml.jackson.server.convert.XmlMapperFactory

@Factory public class XmlMapperFactory extends Object
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 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 Jackson ObjectMapper from the optional configuration and JsonFactory.
      Parameters:
      jacksonConfiguration - The configuration
      xmlConfiguration - The XML configuration
      Returns:
      The ObjectMapper