Ideally I just want a list of strings, or Hashmap String,String :
List<String> = restTemplate.getForObject(url, List.class, urlVariables);
However I receive the error Could not extract response: no suitable HttpMessageConverter found for response type.
I can access the restful api using restclient and retreive the following :
Content-Type text/javascript; charset=iso-8859-1
the repsonse body is :
[{"name":"lemons"},{"name":"pears"},{"name":"apples"}]
and my restTemplate is defined as follows :
<bean id="restTemplate" class="org.springframework.web.client.RestTemplate">
<property name="messageConverters">
<list>
<bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"/>
</list>
</property>
</bean>
I don’t have suitable project for test it, but try: