From 5d19351b384447e5e9a255abec62e2bd25eeeb61 Mon Sep 17 00:00:00 2001 From: wxz Date: Wed, 20 May 2020 09:58:09 +0800 Subject: [PATCH] =?UTF-8?q?1.=E5=A2=9E=E5=8A=A0TokenDTO=E7=9A=84toString()?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E7=94=A8JSON.toJSONString()?= =?UTF-8?q?=E5=AE=9E=E7=8E=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/epmet/commons/tools/security/dto/GovTokenDto.java | 7 ++++++- .../com/epmet/commons/tools/security/dto/TokenDto.java | 5 +++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/GovTokenDto.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/GovTokenDto.java index 5362a740ca..1025d173a4 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/GovTokenDto.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/GovTokenDto.java @@ -1,9 +1,9 @@ package com.epmet.commons.tools.security.dto; +import com.alibaba.fastjson.JSON; import lombok.Data; import java.io.Serializable; -import java.util.List; import java.util.Set; /** @@ -78,5 +78,10 @@ public class GovTokenDto extends BaseTokenDto implements Serializable { * 角色ID列表 */ private Set roleIdList; + + @Override + public String toString() { + return JSON.toJSONString(this); + } } diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/TokenDto.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/TokenDto.java index 402dfc1b59..642bad2941 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/TokenDto.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/security/dto/TokenDto.java @@ -1,5 +1,6 @@ package com.epmet.commons.tools.security.dto; +import com.alibaba.fastjson.JSON; import lombok.Data; import java.io.Serializable; @@ -39,4 +40,8 @@ public class TokenDto extends BaseTokenDto implements Serializable { */ private long updateTime; + @Override + public String toString() { + return JSON.toJSONString(this); + } }