1.项目启动时redis 报错
org.springframework.data.redis.RedisSystemException: Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: WRONGTYPE Operation against a key holding the wrong kind of value

原因 :
redis 数据库中 某一个key :value 已经存在, 而你又尝试 使用该键 创建一个新类型 value。
name :value ( String) ==> name :list (List) 所以报错
在项目启动时遇到Redis异常,问题源于尝试对已存储String类型值的key赋予List类型的新值,导致Redis返回WRONGTYPE错误。解决方案是检查代码中key的使用,确保操作与key当前持有的数据类型匹配。
772

被折叠的 条评论
为什么被折叠?



