类型上面添加@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)的时候,并且自定义了类型序列化器,那么自定义的序列化器必须实现JsonSerializer的serializeWithType方法。
同理,如果自定义了反序列化,也需要实现对应的deserializeWithType方法
类型上面添加@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS)的时候,并且自定义了类型序列化器,那么自定义的序列化器必须实现JsonSerializer的serializeWithType方法。
同理,如果自定义了反序列化,也需要实现对应的deserializeWithType方法