From 3fd14b9d0c32ae1006296777f37b989f60c811b2 Mon Sep 17 00:00:00 2001 From: Kai Moritz Date: Fri, 18 Aug 2023 16:27:29 +0200 Subject: [PATCH] NG --- .../kafka/KafkaServicesConfiguration.java | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java b/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java index 4f6e918b..af8c0aad 100644 --- a/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java +++ b/src/main/java/de/juplo/kafka/chat/backend/persistence/kafka/KafkaServicesConfiguration.java @@ -109,11 +109,11 @@ public class KafkaServicesConfiguration } @Bean - Consumer chatMessageChannelConsumer( + Consumer chatMessageChannelConsumer( Properties defaultConsumerProperties, ChatBackendProperties chatBackendProperties, StringDeserializer stringDeserializer, - JsonDeserializer messageDeserializer) + JsonDeserializer messageDeserializer) { Map properties = new HashMap<>(); defaultConsumerProperties.forEach((key, value) -> properties.put(key.toString(), value)); @@ -136,14 +136,11 @@ public class KafkaServicesConfiguration } @Bean - JsonDeserializer chatMessageDeserializer() + JsonDeserializer chatMessageDeserializer() { - JsonDeserializer deserializer = new JsonDeserializer<>(); + JsonDeserializer deserializer = new JsonDeserializer<>(); deserializer.configure( - Map.of( - JsonDeserializer.USE_TYPE_INFO_HEADERS, false, - JsonDeserializer.VALUE_DEFAULT_TYPE, ChatMessageTo.class, - JsonDeserializer.TRUSTED_PACKAGES, getClass().getPackageName()), + Map.of(JsonDeserializer.TRUSTED_PACKAGES, getClass().getPackageName()), false ); return deserializer; } -- 2.20.1