We are developing a plugin for Jira.
I have the code below in MultiThread.class:
@Service
public class MultiThread extends Thread {
@Autowired
private AtlassianHostRestClients restClients; - getting null value
String method(){
JsonData responseEntity = restTemplate.getForObject(
UriComponentsBuilder.fromUriString(urlString).buildAndExpand("\"" + p + "\"",
"\"" + issueType + "\"", "\"" + date + "\"", "\"" + date + "\"").toUri(),
JsonData.class);
return result;
}
}
But receiving an error with restClients has null pointer exception. This came after I implemented Thread concept to parallel run multiple REST api calls
However, remaining classes have data in restClients object.
Please help AtlassianHostRestClients in multi-thread concept.
