Home > Back-end >  [for] redisTemplate serialization issues
[for] redisTemplate serialization issues

Time:09-29

Project and plan for springboot project, the @autowired RedisTemplate to List Cache to redis, User interface has been serialized, but has been submitted to the "org. Springframework. Data. Redis. Serializer. SerializationException: always serialize; Nested exception is org. Springframework. Core. The serializer. Support. SerializationFailedException: Failed to serialize the object using DefaultSerializer; "Is unusual, I use redisTemplate. OpsForValue () or redisTemplate. OpsForList () to operations are not, for help bosses, thank you very much ~

CodePudding user response:

When this to configure redisTemplate, setting the key value and the value of serialized way:
RedisTemplate. SetKeySerializer (keySer);
RedisTemplate. SetValueSerializer (valueSer);
Look at your code, redisTemplate any Settings

CodePudding user response:

The lack of the default serialization class
  • Related