public class RestTemplateMessageConverterUtil
extends java.lang.Object
RestTemplate
's message converters list to have json support come before xml.
The second item is necessary when marshalling (on the server) instances of e.g. PagedResources
because
of type erasure. This hack can be worked around when un-marshalling (on the client) with use of constructs like
StreamDefinitionResource.Page
.
Modifier and Type | Method and Description |
---|---|
static java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> |
installMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)
Install message converters we're interested in, with json coming before xml.
|
public static java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> installMessageConverters(java.util.List<org.springframework.http.converter.HttpMessageConverter<?>> messageConverters)