Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

有关于java server端 泛型的问题 #238

Closed
milerL opened this issue Oct 10, 2020 · 6 comments · Fixed by #239
Closed

有关于java server端 泛型的问题 #238

milerL opened this issue Oct 10, 2020 · 6 comments · Fixed by #239
Labels
good first issue Good for newcomers

Comments

@milerL
Copy link

milerL commented Oct 10, 2020

java server端
image
image
使用response包了一层

这是go版本 写的response
image
我打算用 interface{} 接收所有数据 不管是 int还是string 还是数组

我看了 #220 的问题
image
注册时 用的RegisterPOJOs
接收一个 结构体时 没什么问题 但是接收一个int64 时 就报错了

image

请问我该怎么做才能接收所有类型的数据

@milerL
Copy link
Author

milerL commented Oct 10, 2020

还有另外一个services 同样返回 Response
无法解析

但是fandById 却没有问题

@milerL
Copy link
Author

milerL commented Oct 10, 2020

这是我service struct
image

@wongoo
Copy link
Contributor

wongoo commented Oct 12, 2020

@milerL pls try the master branch and check whether it resolves your problem

@milerL
Copy link
Author

milerL commented Oct 12, 2020

@wongoo 解决了

有个小问题,如果 java server 有个字段 age是Integer 然后java 传了一个 age:null 这样是不是无法解析

@wongoo
Copy link
Contributor

wongoo commented Oct 12, 2020

@milerL Integer is not supported now , ref https://github.com/hessian-group/hessian-type-mapping

@milerL
Copy link
Author

milerL commented Oct 13, 2020

@wongoo 感谢

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants