From: Kai Moritz Date: Tue, 14 May 2024 20:25:51 +0000 (+0200) Subject: counter: 1.2.14 - Set up type-mappings for JSON-Deserialization X-Git-Tag: counter-1.2.14 X-Git-Url: http://juplo.de/gitweb/?a=commitdiff_plain;h=1b1ac5bca62f07dae4188a5797a36b0fbe72058d;p=demos%2Fkafka%2Fwordcount counter: 1.2.14 - Set up type-mappings for JSON-Deserialization --- diff --git a/pom.xml b/pom.xml index 6405d20..3c5e9eb 100644 --- a/pom.xml +++ b/pom.xml @@ -10,7 +10,7 @@ de.juplo.kafka.wordcount counter - 1.2.13 + 1.2.14 Wordcount-Counter Word-counting stream-processor of the multi-user wordcount-example diff --git a/src/main/java/de/juplo/kafka/wordcount/counter/CounterApplicationConfiguriation.java b/src/main/java/de/juplo/kafka/wordcount/counter/CounterApplicationConfiguriation.java index e2a55c0..926045c 100644 --- a/src/main/java/de/juplo/kafka/wordcount/counter/CounterApplicationConfiguriation.java +++ b/src/main/java/de/juplo/kafka/wordcount/counter/CounterApplicationConfiguriation.java @@ -36,6 +36,10 @@ public class CounterApplicationConfiguriation propertyMap.put(JsonDeserializer.TRUSTED_PACKAGES, CounterApplication.class.getPackageName()); propertyMap.put(JsonDeserializer.KEY_DEFAULT_TYPE, Word.class.getName()); propertyMap.put(JsonDeserializer.VALUE_DEFAULT_TYPE, Word.class.getName()); + propertyMap.put( + JsonDeserializer.TYPE_MAPPINGS, + "word:" + Word.class.getName() + "," + + "counter:" + WordCounter.class.getName()); propertyMap.put(JsonDeserializer.REMOVE_TYPE_INFO_HEADERS, Boolean.FALSE); propertyMap.put(StreamsConfig.STATE_DIR_CONFIG, "target"); if (counterProperties.getCommitInterval() != null)