Update apache-kafka-2/src/main/java/com/baeldung/kafka/message/ordering/serialization/JacksonDeserializer.java

Co-authored-by: Liam Williams <liam.williams@zoho.com>
This commit is contained in:
Amol Gote 2023-10-15 15:59:07 -04:00 committed by GitHub
parent 540da8c779
commit c3af2facae
1 changed files with 4 additions and 0 deletions

View File

@ -4,6 +4,10 @@ import org.apache.kafka.common.serialization.Deserializer;
import java.util.Map; import java.util.Map;
/**
* Configured via {@link org.apache.kafka.clients.consumer.ConsumerConfig#VALUE_DESERIALIZER_CLASS_CONFIG}
*/
@SuppressWarnings("unused")
public class JacksonDeserializer<T> implements Deserializer<T> { public class JacksonDeserializer<T> implements Deserializer<T> {
private final ObjectMapper objectMapper = new ObjectMapper(); private final ObjectMapper objectMapper = new ObjectMapper();
private Class<T> tClass; private Class<T> tClass;