0

我在 Spring Security 中使用基于网关的身份验证。用户通过数据库进行身份验证。通过zuul,将经过身份验证的用户定向到UI微服务。当路由到 UI 微服务时,在管理网关服务上成功验证用户会给出以下异常。

There was an unexpected error (type=Internal Server Error, status=500).
Cannot deserialize; nested exception is org.springframework.core.serializer.support.SerializationFailedException: Failed to deserialize payload. Is the byte array a result of corresponding serialization for DefaultDeserializer?; nested exception is org.springframework.core.NestedIOException: Failed to deserialize object type; nested exception is java.lang.ClassNotFoundException: mysecurity.CustomUserDetails
4

1 回答 1

0

看看你的异常: java.lang.ClassNotFoundException: mysecurity.CustomUserDetails

只要确保你mysecurity.CustomUserDetails的类路径中有类

于 2016-08-22T10:35:09.003 回答