Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
- package com.spec.serializers;
- import com.spec.model.Customer;
- import java.nio.charset.StandardCharsets;
- import org.apache.kafka.common.serialization.Serializer;
- /**
- *
- * @author Administrator
- */
- public class CustomerSerializer implements Serializer<Customer>{
- @Override
- public byte[] serialize(String string, Customer t) {
- String s = t.toString();
- return s.getBytes(StandardCharsets.UTF_8);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement