【Redis】WRONGTYPE Operation against a key holding the wrong kind of value
作者:互联网
问题描述
使用RedisTemplate 对redis数据进行操作,使用Redisson 来实现分布式锁。在设置Redisson锁的key直接偷懒用了RedisTemplate要操作的key,结果报错:“WRONGTYPE Operation against a key holding the wrong kind of value”。
原因分析
解决方法
针对本问题,单独设置Redisson锁的key,解决。因为操作的类型,接收的类型都没问题。
参考文章
https://blog.csdn.net/qq_43227967/article/details/90174950
https://www.cnblogs.com/jeffen/p/6091385.html
标签:kind,Redisson,holding,WRONGTYPE,value,key,https,RedisTemplate 来源: https://blog.csdn.net/xiaoxiao_su123/article/details/119149425