Class XmlMapperFactory


  • @Factory
    public class XmlMapperFactory
    extends java.lang.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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected com.fasterxml.jackson.databind.deser.BeanDeserializerModifier[] beanDeserializerModifiers  
      protected com.fasterxml.jackson.databind.ser.BeanSerializerModifier[] beanSerializerModifiers  
      protected com.fasterxml.jackson.databind.JsonDeserializer[] deserializers  
      protected com.fasterxml.jackson.databind.Module[] jacksonModules  
      protected com.fasterxml.jackson.databind.JsonSerializer[] serializers  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      com.fasterxml.jackson.dataformat.xml.XmlMapper xmlMapper​(io.micronaut.jackson.JacksonConfiguration jacksonConfiguration, JacksonXmlConfiguration xmlConfiguration)
      Builds the core Jackson ObjectMapper from the optional configuration and JsonFactory.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • 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
    • Constructor Detail

      • XmlMapperFactory

        public XmlMapperFactory()
    • Method Detail

      • xmlMapper

        @Singleton
        @Named("xml")
        public com.fasterxml.jackson.dataformat.xml.XmlMapper xmlMapper​(@Nullable
                                                                        io.micronaut.jackson.JacksonConfiguration jacksonConfiguration,
                                                                        @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