src/main/java/com/alipay/remoting/CustomSerializerManager.java
public static void registerCustomSerializer(String className, CustomSerializer serializer) {
        CustomSerializer prevSerializer = classCustomSerializer.putIfAbsent(className, serializer);
        if (prevSerializer != null) {
            throw new RuntimeException("CustomSerializer has been registered for class: "
                                       + className + ", the custom serializer is: "
                                       + prevSerializer.getClass().getName());
        }
    }
public static void registerCustomSerializer(String className, CustomSerializer serializer) {
        CustomSerializer prevSerializer = classCustomSerializer.putIfAbsent(className, serializer);
        if (prevSerializer != null) {
            throw new RuntimeException("CustomSerializer has been registered for class: "
                                       + className + ", the custom serializer is: "
                                       + prevSerializer.getClass().getName());
        }
    }
Register custom serializer for class name.

@param className
@param serializer
@return