java - Dubbo interface parameter serialization problem
伊谢尔伦
伊谢尔伦 2017-05-27 17:41:51
0
2
786

Problem Description

The current project uses dubbo 2.5.3. There is an interface defined as follows:

String queryBusiness(BusinessDto param);

There is a property in BusinessDto called dealTime, whose type is java.sql.Time

When the consumer calls this interface and passes in parameters, the parameter received by the provider is null. It is the entire entity class that is null, not just this parameter that is null.

Of course, there are other parameters in this BusinessDto class, but in the end it was the problem with this parameter.

Currently available solutions

I asked other people, they will use String or other data types when encountering this type, or convert the entire entity class into JSON and then convert it back from the provider. There is no solution or root cause for this problem. s reason.

Hope for help

If anyone has encountered this problem before or discovered the root cause after studying this problem, please give me some advice. Thank you!

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

reply all(2)
漂亮男人

Our project also uses dubbo 2.5.3. Our external SOA service also uses objects as parameters and time parameters, and we have not encountered this problem.

private Date createTime;

Does your BusinessDto implement Serializable? For serialization? But I’m not sure if this is the key to the problem

刘奇

The source of the problem has been found~

/a/11...

Yes, the author is still me...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!