Using spring, with this code :
List> messageConverters = restTemplate.getMessageConverters();
for(HttpMessageConverter ht
Or you can use
public void setSupportedMediaTypes(List supportedMediaTypes)
method which belongs to AbstractHttpMessageConverter
, to add some ContentTypes
you like. This way can let the MappingJackson2HttpMessageConverter
canRead()
your response, and transform it to your desired Class, which on this case,is ProductList Class.
and I think this step should hooked up with the Spring Context initializing. for example, by using
implements ApplicationListener { ... }