-
Notifications
You must be signed in to change notification settings - Fork 510
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
序列化 PageHelper 的 Page 问题 #1624
Comments
没看懂,请把问题再描述清楚一些 |
这是一个最小复现的 demo
|
JSONB dump {
"@type":"com.example.provider.api.entity.PageResult#0",
"@value":{
"list#1":{
"@type":"com.github.pagehelper.Page#2",
"@value":[
{
"@type":"com.example.provider.api.entity.User#3",
"@value":{
"id#4":1
}
},
{
"@type":"#3",
"@value":{
"#4":2
}
}
]
}
}
} 大致跟了下断点,由于 fastjson2/core/src/main/java/com/alibaba/fastjson2/writer/ObjectWriterImplList.java Lines 128 to 135 in ba11876
所以最终写入的 |
所以关于这块,有一点我的疑问是: 对于这种场景(泛指继承于父类从而保证在编译上不保错的情况),到底应该怎么处理呢? |
这是一个好问题,我会和dubbo的同学沟通一个方案 |
https://oss.sonatype.org/content/repositories/snapshots/com/alibaba/fastjson2/fastjson2/2.0.36-SNAPSHOT/ |
验证已修复 |
求助,RestController 里面接口最后返回分页结果时报错 |
前提
项目使用了 PageHelper 进行查询分页,并提供了一个便捷转换分页模型的方法
问题
由于服务提供者使用了 PageHelper 的 Page 分页对象,并且 Page 是继承于 ArrayList 的,Page#getResult 方法返回的 this
在序列化时,实际写出去的并不是基于接口定义的类型,而是返回的实际类型
JSONB dump
其他信息
The text was updated successfully, but these errors were encountered: