From 17d2867f548071ae156034f4fd6dbbec7c9fc4b4 Mon Sep 17 00:00:00 2001 From: "Yangkai.Shen" <237497819@qq.com> Date: Wed, 19 Dec 2018 15:46:31 +0800 Subject: [PATCH] =?UTF-8?q?:sparkles:=20spring-boot-demo-rbac-security=20?= =?UTF-8?q?=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../java/com/xkcoding/rbac/security/util/ResponseUtil.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-demo-rbac-security/src/main/java/com/xkcoding/rbac/security/util/ResponseUtil.java b/spring-boot-demo-rbac-security/src/main/java/com/xkcoding/rbac/security/util/ResponseUtil.java index 1321113..4987ecd 100644 --- a/spring-boot-demo-rbac-security/src/main/java/com/xkcoding/rbac/security/util/ResponseUtil.java +++ b/spring-boot-demo-rbac-security/src/main/java/com/xkcoding/rbac/security/util/ResponseUtil.java @@ -43,7 +43,7 @@ public class ResponseUtil { // FIXME: hutool 的 BUG:JSONUtil.toJsonStr() // 将JSON转为String的时候,忽略null值的时候转成的String存在错误 response.getWriter() - .write(JSONUtil.toJsonStr(new JSONObject(ApiResponse.ofStatus(status, data), true))); + .write(JSONUtil.toJsonStr(new JSONObject(ApiResponse.ofStatus(status, data), false))); } catch (IOException e) { log.error("Response写出JSON异常,", e); } @@ -65,7 +65,7 @@ public class ResponseUtil { // FIXME: hutool 的 BUG:JSONUtil.toJsonStr() // 将JSON转为String的时候,忽略null值的时候转成的String存在错误 response.getWriter() - .write(JSONUtil.toJsonStr(new JSONObject(ApiResponse.ofException(exception), true))); + .write(JSONUtil.toJsonStr(new JSONObject(ApiResponse.ofException(exception), false))); } catch (IOException e) { log.error("Response写出JSON异常,", e); }