counter: 1.2.14 - Set up type-mappings for JSON-Deserialization counter-1.2.14
authorKai Moritz <kai@juplo.de>
Tue, 14 May 2024 20:25:51 +0000 (22:25 +0200)
committerKai Moritz <kai@juplo.de>
Tue, 14 May 2024 20:40:46 +0000 (22:40 +0200)
pom.xml
src/main/java/de/juplo/kafka/wordcount/counter/CounterApplicationConfiguriation.java

diff --git a/pom.xml b/pom.xml
index 6405d20..3c5e9eb 100644 (file)
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
        </parent>
        <groupId>de.juplo.kafka.wordcount</groupId>
        <artifactId>counter</artifactId>
-       <version>1.2.13</version>
+       <version>1.2.14</version>
        <name>Wordcount-Counter</name>
        <description>Word-counting stream-processor of the multi-user wordcount-example</description>
        <properties>
index e2a55c0..926045c 100644 (file)
@@ -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)