类 KafkaTestConfiguration<K,​V>

  • 类型参数:
    K - Key type
    V - Value type

    public class KafkaTestConfiguration<K,​V>
    extends java.lang.Object
    Kafka Test configuration
    从以下版本开始:
    1.0.0
    作者:
    Mercy
    • 构造器概要

      构造器 
      构造器 说明
      KafkaTestConfiguration​(org.springframework.beans.factory.ObjectProvider<org.springframework.kafka.support.converter.RecordMessageConverter> messageConverter, org.springframework.beans.factory.ObjectProvider<org.springframework.kafka.support.ProducerListener<K,​V>> kafkaProducerListener)  
    • 构造器详细资料

      • KafkaTestConfiguration

        public KafkaTestConfiguration​(org.springframework.beans.factory.ObjectProvider<org.springframework.kafka.support.converter.RecordMessageConverter> messageConverter,
                                      org.springframework.beans.factory.ObjectProvider<org.springframework.kafka.support.ProducerListener<K,​V>> kafkaProducerListener)
    • 方法详细资料

      • kafkaTemplate

        @Bean
        public org.springframework.kafka.core.KafkaTemplate<K,​V> kafkaTemplate​(org.springframework.kafka.test.EmbeddedKafkaBroker embeddedKafka)
      • messageListenerContainer

        @Bean
        public org.springframework.kafka.listener.GenericMessageListenerContainer<K,​V> messageListenerContainer​(org.springframework.kafka.test.EmbeddedKafkaBroker embeddedKafka,
                                                                                                                      CompositeMessageListener<K,​V> compositeMessageListener)