🎨 取消使用过时的类型 application_json_utf8
This commit is contained in:
@@ -26,7 +26,7 @@ public class CustomAuthenticationEntryPoint implements AuthenticationEntryPoint
|
||||
@Override
|
||||
public void commence(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse, AuthenticationException e) throws IOException, ServletException {
|
||||
|
||||
httpServletResponse.setHeader("Content-Type", MediaType.APPLICATION_JSON_UTF8.toString());
|
||||
httpServletResponse.setHeader("Content-Type", MediaType.APPLICATION_JSON.toString());
|
||||
httpServletResponse.setStatus(HttpStatus.UNAUTHORIZED.value());
|
||||
httpServletResponse.getWriter().write(
|
||||
objectMapper.writeValueAsString(R.failed(ResultStatus.UNAUTHORIZED, e.getMessage()))
|
||||
|
||||
@@ -81,7 +81,7 @@ public class LoginPasswordDecoderFilter extends OncePerRequestFilter {
|
||||
parameterMap.put(PASSWORD, new String[]{password});
|
||||
}
|
||||
}catch (Exception e){
|
||||
response.setHeader("Content-Type", MediaType.APPLICATION_JSON_UTF8.toString());
|
||||
response.setHeader("Content-Type", MediaType.APPLICATION_JSON.toString());
|
||||
response.setStatus(HttpStatus.UNAUTHORIZED.value());
|
||||
response.getWriter().write(
|
||||
objectMapper.writeValueAsString(R.failed(ResultStatus.UNAUTHORIZED, e.getMessage()))
|
||||
|
||||
Reference in New Issue
Block a user