Comments (11)
虽然可以修改成普通的ArrayList,但这大概率也可以通过升级fastjson解决.
from mybatis-plus.
fastjson已经是最新版本了
from mybatis-plus.
测试看着没什么问题,你断点看下readJSONBObject方法里面的参数把.
from mybatis-plus.
不确定是不是些这样的问题.
alibaba/fastjson2#1835
from mybatis-plus.
看issue里描述是同一个问题,我看看fastjson2那边能不能解决吧
from mybatis-plus.
拿fastjson的代码验证了一下,只有存在属性为public的情况才能复现这个情况,不确定是否为同个情况,需要补充复现工程来看看.
from mybatis-plus.
你的响应模型是自定义的还是直接PageDto?
public class App {
public static void main(String[] args) {
Page<Person> page = new Page<>();
List<Person> data = new ArrayList<>();
data.add(null);
data.add(new Person("abc"));
data.add(null);
// page.data = Collections.unmodifiableList(data);
page.setData(data);
byte[] bytes = JSONB.toBytes(page);
Page page1 = JSONB.parseObject(bytes, Page.class);
System.out.println(page1);
}
public static class Person {
private String name;
public Person() {
}
public Person(String name) {
this.name = name;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
}
public static class Page<T> {
// 属性为public下才会出问题.
public List<T> data = Collections.emptyList();
public void setData(List<T> items) {
this.data = items;
}
public List<T> getData() {
return data;
}
}
}
from mybatis-plus.
Mapper定义了这个,然后一路原样返返回(mapper->service->dubbo->另一个server)。
在Dubbo序列化前,具体类型是Page。
from mybatis-plus.
@nieqiurong https://github.com/Alleninggx/MybatisPlus-test
这是复现工程
改一下redis地址,先启动provider,再启动customer
from mybatis-plus.
发现是开启了这个就有影响,具体还得看下fastjson源码了.
from mybatis-plus.
from mybatis-plus.
Related Issues (20)
- 版本兼容问题 HOT 1
- 自定义InsertBatchSomeColumn,Oracle数据库insert all 报错 HOT 3
- 使用分页插件时在SQL中使用了Group By 语句后 不管加不加Where 条件都会被拦截器拦截 非法SQL,必须要有where条件 HOT 3
- 严重问题: 查询条件全部丢失 HOT 9
- Occasionally occurs java.lang.NullPointerException,but retrying fixes it HOT 6
- 严重问题:3.5.7重写了deleteByIds,如果项目使用了乐观锁,做了空异常校验,会抛出异常
- QueryWrapper查询时,自动调用了TypeHandler对参数进行了加密 HOT 2
- 如何处理AMapper中某个函数初始化依赖BMapper某个函数的的查询结果中的数据 HOT 1
- 有支持Wrapper多表jion的计划吗 HOT 4
- IllegalSQLInnerInterceptor 和 BaseMapper.selectCount(Wrapper)+逻辑删除 冲突问题 HOT 7
- 映射的表实体类上使用多行注释使用注解@TableName调用mybatis-plus自动装配的SQL都会造成读取到多行注释的内容 HOT 1
- 逻辑删除插件导致Jsql解析错误 HOT 2
- mysql表主键 ID 重复 HOT 6
- 建议取消数据层的saveBatch等方法的@Transactional注解,交由业务层自行管理 HOT 5
- SqlServerQuery tablesSql 表描述乱码 HOT 1
- 在使用left join编写做多表联查时当我将从表中的字段作为查询条件的时候报错 HOT 1
- postgres uuid 自定义typehandler 和 自定义主键生成策略,主键赋值时出错。 HOT 5
- 关于官网指南中likeLeft、likeRight功能解释的错误
- mapper.insert(entity) An error occurred Illegal group reference HOT 1
- [Bug]: mybatis-plus-boot-starter 3.5.5 使用逻辑删除功能后,saveOrUpdateBatch报主键已存在错误 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mybatis-plus.