开发者社区 问答 正文

关于springboot2.x版本中stringRedisTemplate操作R?400报错

框架是springboot2.x,但是一直没有办法通过lua脚本删除key,存储没有问题。删除就是不行不知道什么地方错了~~~~~~没有提示报错,但是redis里面始终不能删除。如果直接使用del命令是可以删除的,但是用eval命令就是无法删除了~~代码中对key和requestId做了序列化,这个必须做,如果不做就会报错:io.lettuce.core.RedisException: io.netty.handler.codec.EncoderException: Cannot encode command. Please close the connection as the connection state may be out of sync.              

图二

图三

图四

展开
收起
爱吃鱼的程序员 2020-06-06 09:33:56 829 分享 版权
1 条回答
写回答
取消 提交回答
  • https://developer.aliyun.com/profile/5yerqm5bn5yqg?spm=a2c6h.12873639.0.0.6eae304abcjaIB
                        <p><a>@红薯</a> </p>
                    
    
                        <p>Spring Boot 我不会</p>
                    
    
                            竟然还有大佬不会的~~~~~~其实这个和Springboot没啥关系
    
    2020-06-06 09:34:08
    赞同 展开评论