From 6ca7376ef5307be0f838401ea996fa8912c6f10b Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Sun, 17 Apr 2022 12:48:43 +0200 Subject: [PATCH] =?utf8?q?Springify:=20Type-Mapping=20f=C3=BCr=20den=20Nac?= =?utf8?q?hrichten-Typ=20erg=C3=A4nzt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/de/juplo/kafka/RestProducer.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/de/juplo/kafka/RestProducer.java b/src/main/java/de/juplo/kafka/RestProducer.java index e564a66..bccc166 100644 --- a/src/main/java/de/juplo/kafka/RestProducer.java +++ b/src/main/java/de/juplo/kafka/RestProducer.java @@ -40,6 +40,7 @@ public class RestProducer props.put("compression.type", properties.getCompressionType()); props.put("key.serializer", StringSerializer.class.getName()); props.put("value.serializer", JsonSerializer.class.getName()); + props.put(JsonSerializer.TYPE_MAPPINGS, "message:" + ClientMessage.class.getName()); this.producer = new KafkaProducer<>(props); } -- 2.20.1