org.springframework.data.redis.serializer.SerializationException: Cannot serialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to serialize object using DefaultSerializer; nested exception is java.lang.IllegalArgumentException: DefaultSerializer requires a Serializable payload but received an object of type [com.example.springboot11.entiy.User]
原因是 com.example.springboot11.entiy.User
不能序列化
实体类实现 Serializable 接口就可以了