- propertyMap.put(JsonSerializer.ADD_TYPE_INFO_HEADERS, false);
- 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.USE_TYPE_INFO_HEADERS, false);
- propertyMap.put(StreamsConfig.STATE_DIR_CONFIG, "target");
- if (properties.getCommitInterval() != null)
- propertyMap.put(StreamsConfig.COMMIT_INTERVAL_MS_CONFIG, properties.getCommitInterval());
- if (properties.getCacheMaxBytes() != null)
- propertyMap.put(StreamsConfig.CACHE_MAX_BYTES_BUFFERING_CONFIG, properties.getCacheMaxBytes());
- propertyMap.put(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest");
+ propertyMap.put(
+ JsonDeserializer.TYPE_MAPPINGS,
+ "user:" + User.class.getName() + "," +
+ "word:" + Word.class.getName() + "," +
+ "counter:" + WordCounter.class.getName());