修复验证码异常时network面板的中文会出现乱码问题

2.X
RuoYi 5 years ago committed by 疯狂的狮子li
parent 7cca138767
commit 2736beef1d

@ -59,6 +59,7 @@ public class ValidateCodeFilter extends AbstractGatewayFilterFactory<Object>
catch (Exception e) catch (Exception e)
{ {
ServerHttpResponse response = exchange.getResponse(); ServerHttpResponse response = exchange.getResponse();
response.getHeaders().add("Content-Type", "application/json;charset=UTF-8");
return exchange.getResponse().writeWith( return exchange.getResponse().writeWith(
Mono.just(response.bufferFactory().wrap(JSON.toJSONBytes(AjaxResult.error(e.getMessage()))))); Mono.just(response.bufferFactory().wrap(JSON.toJSONBytes(AjaxResult.error(e.getMessage())))));
} }

Loading…
Cancel
Save