From c0251e5cda35a1ab8c21d62edfd3d60e654d082a Mon Sep 17 00:00:00 2001 From: RuoYi Date: Fri, 31 Jul 2020 15:32:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=AA=8C=E8=AF=81=E7=A0=81?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E6=97=B6network=E9=9D=A2=E6=9D=BF=E7=9A=84?= =?UTF-8?q?=E4=B8=AD=E6=96=87=E4=BC=9A=E5=87=BA=E7=8E=B0=E4=B9=B1=E7=A0=81?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/ruoyi/gateway/filter/ValidateCodeFilter.java | 1 + 1 file changed, 1 insertion(+) diff --git a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/ValidateCodeFilter.java b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/ValidateCodeFilter.java index cc4d673..e2cbd0b 100644 --- a/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/ValidateCodeFilter.java +++ b/ruoyi-gateway/src/main/java/com/ruoyi/gateway/filter/ValidateCodeFilter.java @@ -59,6 +59,7 @@ public class ValidateCodeFilter extends AbstractGatewayFilterFactory catch (Exception e) { ServerHttpResponse response = exchange.getResponse(); + response.getHeaders().add("Content-Type", "application/json;charset=UTF-8"); return exchange.getResponse().writeWith( Mono.just(response.bufferFactory().wrap(JSON.toJSONBytes(AjaxResult.error(e.getMessage()))))); }