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

序列化字段后个别字段缺失 #517

Open
feifeizhang-11395 opened this issue Sep 27, 2020 · 0 comments
Open

序列化字段后个别字段缺失 #517

feifeizhang-11395 opened this issue Sep 27, 2020 · 0 comments

Comments

@feifeizhang-11395
Copy link

在调用KryoValueEncoder.apply(Object value) ,我的结构中存在这样 一个字段是smry,结果序列化之后,这个字段就不见了,这个字段是有数据的,我修改了
static ThreadLocal<Object[]> kryoThreadLocal = ThreadLocal.withInitial(() -> {
……………………
//我放开了这一行注释,发现,问题修复了
kryo.setInstantiatorStrategy(new StdInstantiatorStrategy());
//kryo.setInstantiatorStrategy(new Kryo.DefaultInstantiatorStrategy(new StdInstantiatorStrategy()));
……………………
});
//我猜测可能是版本的问题,因为这里直接引用的是2.5.12,第二行注释,点进去,引用的确实2.6.0
由于我不是很了解序列化方式,能帮我看看这个怎么解决的吗,目前我重写了这段代码

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

No branches or pull requests

1 participant