Move feed message converters ahead of jackson/jaxb2
The Atom/RSS message converters are now registered ahead of the Jackson and the JAXB2 message converters by default. Since the Atom and RSS converters convert to and from very specific object types Feed and Channel respectively, that shouldn't introduce any regressions and will work more intuitively when the requested media type is "*/*". Issue: SPR-9054
This commit is contained in:
@@ -149,6 +149,10 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
|
||||
this.messageConverters.add(new ResourceHttpMessageConverter());
|
||||
this.messageConverters.add(new SourceHttpMessageConverter());
|
||||
this.messageConverters.add(new XmlAwareFormHttpMessageConverter());
|
||||
if (romePresent) {
|
||||
this.messageConverters.add(new AtomFeedHttpMessageConverter());
|
||||
this.messageConverters.add(new RssChannelHttpMessageConverter());
|
||||
}
|
||||
if (jaxb2Present) {
|
||||
this.messageConverters.add(new Jaxb2RootElementHttpMessageConverter());
|
||||
}
|
||||
@@ -158,10 +162,6 @@ public class RestTemplate extends InterceptingHttpAccessor implements RestOperat
|
||||
else if (jacksonPresent) {
|
||||
this.messageConverters.add(new MappingJacksonHttpMessageConverter());
|
||||
}
|
||||
if (romePresent) {
|
||||
this.messageConverters.add(new AtomFeedHttpMessageConverter());
|
||||
this.messageConverters.add(new RssChannelHttpMessageConverter());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user