0
Lorsque je tente d'ajouter un objet à la session comme suit:Ajout objet HttpSession échoue dans SpringBoot avec Redis
HttpSession session = ....
MyObject object = ....
session.setAttribute("my_object", object);
puis-je obtenir une exception:
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 [MyObject]
Que dois-je faire pour instruire REDIS en sérialisant l'objet MyObject
?
Oui merci, ça fonctionne –