在写 DiscordBot 引用的一个库中的 MessageEmebd 对象,想用 Redis 做消息队列,取出的时候反序列化失败
现在用的 GenericJackson2JsonRedisSerializer,其他序列化器也试过都不行
Could not read JSON: Cannot construct instance of `net.dv8tion.jda.api.entities.MessageEmbed$Field` (no Creators, like default construct, exist)
就是这个 MessageEmbed 里有个 public static class Field 没有无参构造器导致,也没办法去改他,目前我是直接用的 LinkedBlockingQueue 存,但是每次重启都要丢一些没消费完的数据,因为是自己写着玩的,所以凑活在用