J'essaye Spymemcached pour Java.Spymemcached - objet non-sérialisable pour l'objet d'authentification
J'ai créé avec succès un MemCachedClient et je suis en train de le faire:
mc.set (jeton, 0, authentification);
jeton est une chaîne et l'objet d'authentification est une interface d'authentification Spring qui s'étend Serializable: http://docs.spring.io/spring-security/site/docs/current/apidocs/org/springframework/security/core/Authentication.html
Cela jette une exception objet non sérialisable:
{
"timestamp": 1438463381311,
"status": 500,
"error": "Internal Server Error",
"exception": "java.lang.IllegalArgumentException",
"message": "Non-serializable object",
"path": "/auth"
}
Quand j'ai essayé de sauver le jeton et l'objet d'authentification dans Ehcache, il fonctionne parfaitement et la clé et la valeur doivent également être sérialisables:
Ehcache.put (nouvel élément (jeton, authentification));
Est-ce que quelqu'un sait pourquoi cela ne fonctionne pas avec spymemcached? J'utilise:
compile 'net.spy:spymemcached:2.12.0'