这篇博客主要介绍了在使用Spring Boot操作Redis时遇到的'WRONGTYPE Operation against a key holding the wrong kind of value'错误。问题源于尝试对一个存储了非HashMap类型值的Key执行HMSET操作。解决方案是先删除原有的键值对,然后再进行HMSET操作,从而避免类型不匹配的错误。
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
at org.springframework