Class PulsarHeaderObjectMapperUtils

java.lang.Object
org.springframework.pulsar.annotation.PulsarHeaderObjectMapperUtils

public final class PulsarHeaderObjectMapperUtils extends Object
Resolves the ObjectMapper to use when serializing JSON header values.
Since:
1.2.0
Author:
Chris Bono
  • Method Details

    • customMapper

      public static Optional<com.fasterxml.jackson.databind.ObjectMapper> customMapper(BeanFactory beanFactory)
      Gets the optional ObjectMapper to use when deserializing JSON header values. The mapper bean is expected to be registered with the name 'pulsarHeaderObjectMapper'.
      Parameters:
      beanFactory - the bean factory that may contain the mapper bean
      Returns:
      optional mapper or empty if bean not registered under the expected name