🐛 Fixing a bug. 统一登录错误提示乱码
This commit is contained in:
1 parent
7b578b5549
commit
e192c729e6
1 file changed
+2
-2
+2
-2
@@ -47,7 +47,7 @@ public class FormAuthenticationFailureHandler implements AuthenticationFailureHa
|
||||
@SneakyThrows
|
||||
public void onAuthenticationFailure(HttpServletRequest request, HttpServletResponse response, AuthenticationException exception) {
|
||||
log.debug("表单登录失败:{}", exception.getLocalizedMessage());
|
||||
WebUtils.getResponse().sendRedirect(String.format("/token/login?error=%s"
|
||||
, HttpUtil.encodeParams(exception.getMessage(), Charset.defaultCharset())));
|
||||
String url = HttpUtil.encodeParams(String.format("/token/login?error=%s", exception.getMessage()), Charset.defaultCharset());
|
||||
WebUtils.getResponse().sendRedirect(url);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user