refactor(系统设置): 在Jira里面填写禅道信息测试连接成功
--bug=1013182 --user=李玉号 [系统设置]gihtub#13565在Jira里面填写禅道信息,测试成功 https://www.tapd.cn/55049933/s/1158316 Closes #13565
This commit is contained in:
parent
810543580d
commit
3744035281
|
@ -182,8 +182,12 @@ public abstract class JiraAbstractClient extends BaseClient {
|
|||
}
|
||||
|
||||
public void auth() {
|
||||
ResponseEntity<String> response = null;
|
||||
try {
|
||||
restTemplate.exchange(getBaseUrl() + "/myself", HttpMethod.GET, getAuthHttpEntity(), String.class);
|
||||
response = restTemplate.exchange(getBaseUrl() + "/myself", HttpMethod.GET, getAuthHttpEntity(), String.class);
|
||||
if (StringUtils.isNotBlank(response.getBody()) && !response.getBody().startsWith("{\"self\"")) {
|
||||
MSException.throwException(Translator.get("jira_auth_url_error"));
|
||||
}
|
||||
} catch (HttpClientErrorException e) {
|
||||
if (e.getRawStatusCode() == 401) {
|
||||
MSException.throwException(Translator.get("jira_auth_error"));
|
||||
|
|
|
@ -321,3 +321,4 @@ error_code_is_unique=Error code is not unique
|
|||
|
||||
no_version_exists=version not exists
|
||||
jira_auth_error=Account name or password (Token) is wrong
|
||||
jira_auth_url_error=The test connection failed, please check whether the Jira address is correct
|
|
@ -319,3 +319,4 @@ issue_jira_info_error=请检查服务集成信息或Jira项目ID
|
|||
error_code_is_unique=错误代码不可重复
|
||||
no_version_exists=不存在版本!请先创建项目的版本
|
||||
jira_auth_error=账号名或密码(Token)错误
|
||||
jira_auth_url_error=测试连接失败,请检查Jira地址是否正确
|
||||
|
|
|
@ -319,3 +319,4 @@ error_code_is_unique=錯誤代碼不可重複
|
|||
|
||||
no_version_exists=不存在版本!請先創建項目的版本
|
||||
jira_auth_error=賬號名或密碼(Token)錯誤
|
||||
jira_auth_url_error=測試連接失敗,請檢查Jira地址是否正確
|
Loading…
Reference in New Issue