java.lang.IllegalArgumentException: недопустимое количество значений переменных при использовании restTemplate.getForObject - PullRequest
0 голосов
/ 23 марта 2019

Я пытался использовать restTemplate.getForEntity (requestPath, String.class);

requestPath выглядит следующим образом

http://localhost:8200/mr/AsyncExportService/rest/v2/export/async?dataset=sourcesConferenceDocument&exportFormat=DOCX&idList=1000627,1000623,1000622&exportContent={"sectionList":[{"id":"SNAPSHOT"}]}&multipleReportDelivery=SINGLE_FILE

Я получаю ниже исключения

java.lang.IllegalArgumentException: недопустимое количество значений переменных в [http://localhost:8200/mr/AsyncExportService/rest/v2/export/async?dataset=sourcesConferenceDocument&exportFormat=DOCX&idList=1000627,1000623,1000622&exportContent={"sectionList":[{"id":"SNAPSHOT"}]}&multipleReportDelivery=SINGLE_FILE]: ожидаемое 1; получил 0

at org.springframework.web.util.UriTemplate.expand(UriTemplate.java:120)
at org.springframework.web.client.RestTemplate.execute(RestTemplate.java:400)
at org.springframework.web.client.RestTemplate.getForObject(RestTemplate.java:199)
at com.healthcheck.services.StepDefenitions.HealthCheck.getResponse(HealthCheck.java:16)
at com.healthcheck.services.StepDefenitions.HealthStatusStepdefs.i_call_the_service(HealthStatusStepdefs.java:76)

Пожалуйста, помогите мне решить эту проблему

...