我正在使用springboot并尝试编写一个KafkaProducer来推送Kafka队列中的消息。我在@Configuration类中创建了这些方法。configProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, bootstrapAddress); //bootstrapAddress holds address of kafkaStringSerializer.class);
return new DefaultKafkaProducerF