dangdangdotcom / dubbox

Dubbox now means Dubbo eXtensions, and it adds features like RESTful remoting, Kyro/FST serialization, etc to the Dubbo service framework.
http://dangdangdotcom.github.io/dubbox
Apache License 2.0
4.9k stars 2.06k forks source link

dubbox rest 接口层参数为基类 #319

Open lipanpan opened 7 years ago

lipanpan commented 7 years ago

//接口桩: public interface ThirdUserRpcService { Result doBind(BindInfoDto dto); }

//dto子类: SubBindInfoDto extends BindInfoDto { }

main{ // 传递子类作为参数 ThirdUserRpcService.doBind(new SubBindInfoDto());
}

结果:程序运行异常,无法识别子类里面的属性

请问:这种在接口层将参数定义为基类,调用时传递子类是怎么处理的?