projects
/
demos
/
kafka
/
training
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
39d1bd1
)
Springify: Type-Mapping für den Nachrichten-Typ ergänzt
author
Kai Moritz
<kai@juplo.de>
Sun, 17 Apr 2022 10:48:43 +0000
(12:48 +0200)
committer
Kai Moritz
<kai@juplo.de>
Sun, 12 Jun 2022 13:23:09 +0000
(15:23 +0200)
src/main/java/de/juplo/kafka/RestProducer.java
patch
|
blob
|
history
diff --git
a/src/main/java/de/juplo/kafka/RestProducer.java
b/src/main/java/de/juplo/kafka/RestProducer.java
index
e564a66
..
bccc166
100644
(file)
--- 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);
}