0
Java REST API를 사용하여 JIRA의 그룹에 사용자를 추가해야합니다. groupname을 쿼리 매개 변수로 사용하고 POST 이름을 페이로드로 사용하여 POST를 수행해야합니다. 나는 Spring RestOperations를 동일하게 사용하고있다.JIRA REST API의 POST 메소드 문제
JSONObject jsonObject = new JSONObject();
jsonObject.put("username", [email protected]);
Group group = restOperations.exchange(
"https://cs.jira.com/jira/rest/api/2/group/user?groupname=jira-users",
HttpMethod.POST,
new HttpEntity<>(jsonObject, getAuthorizedHttpHeaders(user, pass)),
Group.class).getBody();
나는 다음과 같은 예외가 받고 있어요 :
이org.springframework.web.client.RestClientException: Could not write request: no suitable HttpMessageConverter found for request type [org.codehaus.jettison.json.JSONObject] and content type [application/json;charset=UTF-8]
사람이 좀 도와 수를이 내 코드?