feat: 增加日志

This commit is contained in:
zengxiaobo 2024-05-20 15:48:24 +08:00
parent 0d226184ee
commit 476808710c

View File

@ -75,12 +75,13 @@ public class AxContextInterceptor implements HandlerInterceptor {
} }
if (authorization.startsWith("Bearer")) { if (authorization.startsWith("Bearer")) {
String result; String result;
String url = StringUtils.firstNonBlank(supplierHost, ENV_HOSTS.get(appRuntime.getEnv()));
try { try {
String url = StringUtils.firstNonBlank(supplierHost, ENV_HOSTS.get(appRuntime.getEnv()));
result = HTTP_CLIENT.get(url, RequestParams.FormParams.builder() result = HTTP_CLIENT.get(url, RequestParams.FormParams.builder()
.headers(ImmutableMap.of("Authorization", authorization)) .headers(ImmutableMap.of("Authorization", authorization))
.build()); .build());
} catch (Exception ex) { } catch (Exception ex) {
log.error("获取登陆信息错误, url = {}, authorization = {}", url, authorization, ex);
throw ResultCode.RUNTIME_EXCEPTION.toException("获取登陆信息错误" + ex.getMessage()); throw ResultCode.RUNTIME_EXCEPTION.toException("获取登陆信息错误" + ex.getMessage());
} }
//这里是一个非标准返回 //这里是一个非标准返回