Class KafkaJacksonConfiguration

java.lang.Object
org.springframework.modulith.events.kafka.KafkaJacksonConfiguration

@AutoConfiguration @AutoConfigureBefore(org.springframework.boot.autoconfigure.kafka.KafkaAutoConfiguration.class) @ConditionalOnClass(com.fasterxml.jackson.databind.ObjectMapper.class) @ConditionalOnProperty(name="spring.modulith.events.kafka.enable-json", havingValue="true", matchIfMissing=true) @PropertySource("classpath:kafka-json.properties") class KafkaJacksonConfiguration extends Object
Auto-configures Spring for Apache Kafka to use JSON as transport format by default.
Since:
1.1
Author:
Oliver Drotbohm
  • Constructor Details

    • KafkaJacksonConfiguration

      KafkaJacksonConfiguration()
  • Method Details

    • jsonMessageConverter

      @Bean @ConditionalOnMissingBean(org.springframework.kafka.support.converter.RecordMessageConverter.class) org.springframework.kafka.support.converter.ByteArrayJsonMessageConverter jsonMessageConverter(ObjectProvider<com.fasterxml.jackson.databind.ObjectMapper> mapper)