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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiontools.jackson.databind.ObjectMapperdefaultAxonObjectMapper(org.springframework.beans.factory.ObjectProvider<tools.jackson.databind.JacksonModule> modules) Returns the default Axon FrameworkObjectMapper, if required.tools.jackson.databind.JacksonModuleReturns a JacksonModulethat provides a custom deserializer for the Spring DataPageinterface.
-
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 FrameworkObjectMapper, if required.This
ObjectMapperbean is only created when there is no otherObjectMapperbean present and whenever the user specified either theConverterProperties.ConverterType.DEFAULTorConverterProperties.ConverterType.JACKSONConverterType.- Parameters:
modules- AnObjectProviderofJacksonModulebeans to register with theObjectMapper.- 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 JacksonModulethat provides a custom deserializer for the Spring DataPageinterface.This
Modulebean is only created when the Spring DataPageinterface is on the classpath and whenever the user specified either theConverterProperties.ConverterType.DEFAULTorConverterProperties.ConverterType.JACKSONConverterType. The module deserializesPageinstances intoPageImplobjects.- Returns:
- A Jackson
Modulethat deserializesPageintoPageImpl. - Since:
- 5.1.0
- See Also:
-