0
Wenn ich versuche, ein Objekt in die Sitzung wie folgt hinzufügen:Hinzufügen Objekt Http nicht in SpringBoot mit Redis
HttpSession session = ....
MyObject object = ....
session.setAttribute("my_object", object);
dann bekomme ich eine Ausnahme:
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]
Was soll ich tun, um REDIS beim Serialisieren des Objekts anweisen MyObject
?
Ja danke, es funktioniert –