From ae200a4dedf141b714a7bc4e76e0db50451cd61e Mon Sep 17 00:00:00 2001 From: mengqiang <> Date: Mon, 1 Mar 2021 20:29:37 +0800 Subject: [PATCH] no message --- .../main/java/com/example/sso/client/auth/AuthService.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sso-sys-client1/src/main/java/com/example/sso/client/auth/AuthService.java b/sso-sys-client1/src/main/java/com/example/sso/client/auth/AuthService.java index 967bd49..d685bf8 100644 --- a/sso-sys-client1/src/main/java/com/example/sso/client/auth/AuthService.java +++ b/sso-sys-client1/src/main/java/com/example/sso/client/auth/AuthService.java @@ -47,7 +47,7 @@ public class AuthService { } ResultModel resultModel = JSON.parseObject(response, ResultModel.class); - if (null == resultModel || StringUtils.isBlank(resultModel.getData().toString())) { + if (null == resultModel) { throw new RuntimeException("认证中心-无返回"); } @@ -55,6 +55,10 @@ public class AuthService { throw new RuntimeException("认证中心调用失败," + resultModel.getMsg()); } + if ( StringUtils.isBlank(resultModel.getData().toString())) { + throw new RuntimeException("认证中心-无Data返回"); + } + return JSON.parseObject(resultModel.getData().toString(), ApplyAuthVO.class); }