apache / dubbo

The java implementation of Apache Dubbo. An RPC and microservice framework.
https://dubbo.apache.org/
Apache License 2.0
40.48k stars 26.43k forks source link

Add a new property in DTO on provider side, consumer can not recognize the new property #926

Closed solomon4github closed 6 years ago

solomon4github commented 6 years ago

采用如下配置

provider定义的返回对象放至在jar包里,由consumer引用,当jar包中的返回对象新增属性,而consumer没有更新jar包引用时,consumer接收到的返回对象会是null

能否有兼容方案,使得返回信息只是缺少新增字段,而不是返回null

lovepoem commented 6 years ago

这个问题不应该存在在吧?服务端返回对象多一个字段,客户端也不应该得到null呀。新加的字段是什么类型?

chickenlj commented 6 years ago

@solomon4github Forget about dubbo serialization protocol, use the default hessian2 or fastjson serialization instead. dubbo serialization has not been tested in production yet, and we are going to mark it as deprecated.