Class KafkaJacksonConfiguration

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

@AutoConfiguration @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 @ConditionalOnBean(com.fasterxml.jackson.databind.ObjectMapper.class) @ConditionalOnMissingBean(org.springframework.kafka.support.converter.JsonMessageConverter.class) org.springframework.kafka.support.converter.JsonMessageConverter jsonMessageConverter(com.fasterxml.jackson.databind.ObjectMapper mapper)