2016-08-22 72 views
0

我在春季安全中使用基于网关的身份验证。用户通过数据库进行身份验证。通过zuul,经过身份验证的用户被定向到UI微服务。 A在路由到UI微服务时,在管理网关服务处成功验证用户会给出以下例外。弹簧安全管理网关和angularjs异常

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 

回答

0

看看你的例外: java.lang.ClassNotFoundException: mysecurity.CustomUserDetails

只要确保你有mysecurity.CustomUserDetails类在classpath

+0

三江源maciek你让我的代码工作。 –