我正在使用springboot并尝试编写一个KafkaProducer来推送Kafka队列中的消息。我在@Configuration类中创建了这些方法。KafkaMessageProducer类中自动连接了这个KafkaTemplate bean,它负责处理KafkaTemplate的发送函数。<pathoffile>.KafkaMessageProducer required a bean of type 'org.spring
我的环境上下文如下所示:- Maven Multi Module project (this is a module, it imports its SpringAction:
Consider defining a bean of type 'org.springframework.kafka.core.KafkaTemplate' in your configurationspring-boot-d
我正在使用kafka和spring引导,我需要将JSON对象发送到kafka,重点是我能够以JSON的形式发送对象,配置KafkaTemplate,但只为这个对象发送。;import org.springframework.kafka.core.ProducerFactoryjava.util.Map;
public class K