Şöyle yaparız
@Configurationpublic class TitleBatchConfig { private final KafkaTemplate<String,Title> template; @Bean public KafkaItemWriter<String,Title> titleItemWriter(){ return new KafkaItemWriterBuilder<String,Title>() .kafkaTemplate(this.template) .itemKeyMapper(Title::id) .build(); } ... }
Hiç yorum yok:
Yorum Gönder