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

[BUG] 无法序列化java.util.ImmutableCollections$Map1 #640

Closed
itlihuaxin opened this issue Aug 6, 2022 · 2 comments
Closed

[BUG] 无法序列化java.util.ImmutableCollections$Map1 #640

itlihuaxin opened this issue Aug 6, 2022 · 2 comments
Labels
bug Something isn't working
Milestone

Comments

@itlihuaxin
Copy link

版本信息:[2.0.10]

在使用GenericFastJsonRedisSerializer时异常

输入:java.utilMap.of("abc", 1);

异常:
Caused by: org.springframework.data.redis.serializer.SerializationException: Could not deserialize: create map error : class java.util.ImmutableCollections$Map1; nested exception is com.alibaba.fastjson2.JSONException: create map error : class java.util.ImmutableCollections$Map1
at com.alibaba.fastjson2.support.spring.data.redis.GenericFastJsonRedisSerializer.deserialize(GenericFastJsonRedisSerializer.java:71)
at org.springframework.data.redis.core.AbstractOperations.deserializeValue(AbstractOperations.java:335)
at org.springframework.data.redis.core.AbstractOperations$ValueDeserializingRedisCallback.doInRedis(AbstractOperations.java:61)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:222)
at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:189)
at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:96)
at org.springframework.data.redis.core.DefaultListOperations.rightPop(DefaultListOperations.java:239)

之前的2.0.5是没问题的

@itlihuaxin itlihuaxin added the bug Something isn't working label Aug 6, 2022
@itlihuaxin
Copy link
Author

看了redis 2.0.10版本后台信息带有{"@type":"java.util.ImmutableCollections$Map1"}

@wenshao wenshao added this to the 2.0.11 milestone Aug 6, 2022
@wenshao
Copy link
Member

wenshao commented Aug 7, 2022

https://github.com/alibaba/fastjson2/releases/tag/2.0.11
问题已修复,请用新版本

@wenshao wenshao closed this as completed Aug 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants