Class ObjectMapperAutoConfiguration

java.lang.Object
org.axonframework.extension.springboot.autoconfig.ObjectMapperAutoConfiguration

@AutoConfiguration @AutoConfigureBefore({AxonAutoConfiguration.class,CBORMapperAutoConfiguration.class}) @AutoConfigureAfter(name="org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration") @ConditionalOnClass(name="tools.jackson.databind.ObjectMapper") @EnableConfigurationProperties(ConverterProperties.class) public class ObjectMapperAutoConfiguration extends Object
Autoconfiguration that constructs a default ObjectMapper, typically to be used by a JacksonConverter.
Since:
3.4.0
Author:
Steven van Beelen, Theo Emanuelsson
  • Constructor Details

    • ObjectMapperAutoConfiguration

      public ObjectMapperAutoConfiguration()
  • Method Details

    • defaultAxonObjectMapper

      @Bean("defaultAxonObjectMapper") @ConditionalOnMissingBean @Conditional(org.axonframework.extension.springboot.autoconfig.ObjectMapperAutoConfiguration.JacksonConfiguredCondition.class) public tools.jackson.databind.ObjectMapper defaultAxonObjectMapper(org.springframework.beans.factory.ObjectProvider<tools.jackson.databind.JacksonModule> modules)
      Returns the default Axon Framework ObjectMapper, if required.

      This ObjectMapper bean is only created when there is no other ObjectMapper bean present and whenever the user specified either the ConverterProperties.ConverterType.DEFAULT or ConverterProperties.ConverterType.JACKSON ConverterType.

      Parameters:
      modules - An ObjectProvider of JacksonModule beans to register with the ObjectMapper.
      Returns:
      The default Axon Framework ObjectMapper, if required.
    • springDataPageJacksonModule

      @Bean @ConditionalOnClass(org.springframework.data.domain.Page.class) @Conditional(org.axonframework.extension.springboot.autoconfig.ObjectMapperAutoConfiguration.JacksonConfiguredCondition.class) public tools.jackson.databind.JacksonModule springDataPageJacksonModule()
      Returns a Jackson Module that provides a custom deserializer for the Spring Data Page interface.

      This Module bean is only created when the Spring Data Page interface is on the classpath and whenever the user specified either the ConverterProperties.ConverterType.DEFAULT or ConverterProperties.ConverterType.JACKSON ConverterType. The module deserializes Page instances into PageImpl objects.

      Returns:
      A Jackson Module that deserializes Page into PageImpl.
      Since:
      5.1.0
      See Also: