2.22.3. 其他 Camel Quarkus 配置
2.22.3.1. 以原生模式划分/解放对象 复制链接链接已复制到粘贴板!
复制链接链接已复制到粘贴板!
当以原生模式进行 marshaing/unmarshaling 对象时,需要注册所有序列化的类才能 反映。因此,在使用 GsonDataFormat.setUnmarshalType(…) 时,GsonDataFormat.setUnmarshalTypeName(…) 和 GsonDataFormat.setUnmarshalGenericType(…),应该注册 unmarshal type 和 sub 字段类型。查看此 集成测试 中的工作示例。