修改了接口服务连接失败程序退出的问题
This commit is contained in:
parent
a47fc1ee34
commit
1ecb424462
@ -101,12 +101,11 @@ public class AdxpFlightServiceHttpClient implements org.springframework.beans.fa
|
||||
log.info("已登录 ADXP 适配器服务: sessionId={}", sessionId);
|
||||
} else {
|
||||
String message = body != null ? (String) body.get("message") : "Unknown error";
|
||||
throw new IllegalStateException("登录失败: " + message);
|
||||
log.warn("登录 ADXP 适配器服务失败: {}", message);
|
||||
}
|
||||
|
||||
} catch (Exception e) {
|
||||
log.error("登录 ADXP 适配器服务失败", e);
|
||||
throw new RuntimeException("登录失败: " + e.getMessage(), e);
|
||||
log.warn("登录 ADXP 适配器服务失败,适配器服务将暂时不可用", e);
|
||||
} finally {
|
||||
sessionLock.unlock();
|
||||
}
|
||||
|
||||
@ -70,7 +70,8 @@ public class AuthService {
|
||||
} catch (Exception e) {
|
||||
log.error("Failed to login: ", e);
|
||||
}
|
||||
throw new RuntimeException("Failed to obtain token");
|
||||
log.warn("Failed to obtain token, will retry later");
|
||||
return null;
|
||||
}
|
||||
|
||||
//Token续时
|
||||
|
||||
Loading…
Reference in New Issue
Block a user