下面列出了org.springframework.security.core.AuthenticationException#toString ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@RequestMapping("/login/error")
@ResponseBody
public Msg<?> loginError(HttpServletRequest request) {
AuthenticationException exception = (AuthenticationException)request.getSession().getAttribute("SPRING_SECURITY_LAST_EXCEPTION");
return new Msg<>(false, exception.getMessage(), exception.toString());
}
@RequestMapping("/login/error")
@ResponseBody
public String loginError(HttpServletRequest request, HttpServletResponse response) {
AuthenticationException exception =
(AuthenticationException)request.getSession().getAttribute("SPRING_SECURITY_LAST_EXCEPTION");
return exception.toString();
}