首先创建springboot工程,使用maven进行构建,pom依赖如下:
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-rest-java-client-core</artifactId>
<version>5.1.6</version>
</dependency>
<dependency>
<groupId>io.atlassian.fugue</groupId>
<artifactId>fugue</artifactId>
<version>4.7.2</version>
<scope>provided</scope>
</dependency>
加入依赖以后可以通过asynchronousJiraRestClientFactory进行登陆获取认证,本次使用用户名密码的方式进行校验,也可以使用其他 的方式进行校验(例如token的方式),登陆验证以后获取到jiraRestClient进行后续的操作。
public JiraRestClient login_jira(){
AsynchronousJiraRestClientFactory asynchronousJiraRestClientFactory = new AsynchronousJiraRestClientFactory();
JiraRestClient jiraRestClient = asynchronousJi