fastjson guava table 反序列化失败

qyswt5oh  于 2021-11-27  发布在  Java
关注(0)|答案(0)|浏览(330)

代码

Table<String, Integer, List<Integer>> blockTable = HashBasedTable.create();

    blockTable.put("A", 1,  Arrays.asList(1,2,3));
    blockTable.put("A", 2, Arrays.asList(1,2,3));

    blockTable.put("B", 1, Arrays.asList(1,2,3));

    redisHelper.set("aa", blockTable.rowMap());

    Object value = redisHelper.get("aa");`

异常如下:
org.springframework.data.redis.serializer.SerializationException: Could not deserialize: unsupport type class com.google.common.collect.StandardTable$RowMap; nested exception is com.alibaba.fastjson.JSONException: unsupport type class com.google.common.collect.StandardTable$RowMap at com.alibaba.fastjson.support.spring.GenericFastJsonRedisSerializer.deserialize(GenericFastJsonRedisSerializer.java:37) ~[fastjson-1.2.66.jar:?] at org.springframework.data.redis.core.AbstractOperations.deserializeValue(AbstractOperations.java:335) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE] at org.springframework.data.redis.core.AbstractOperations$ValueDeserializingRedisCallback.doInRedis(AbstractOperations.java:61) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE] at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:228) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE] at org.springframework.data.redis.core.RedisTemplate.execute(RedisTemplate.java:188) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE] at org.springframework.data.redis.core.AbstractOperations.execute(AbstractOperations.java:96) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE] at org.springframework.data.redis.core.DefaultValueOperations.get(DefaultValueOperations.java:53) ~[spring-data-redis-2.3.1.RELEASE.jar:2.3.1.RELEASE]

请问怎么解?

暂无答案!

目前还没有任何答案,快来回答吧!

相关问题