public static void init(List<HttpMessageConverter<?>> messageConverters) { messageConverters.add(new ByteArrayHttpMessageConverter()); messageConverters.add(new StringHttpMessageConverter()); messageConverters.add(new ResourceHttpMessageConverter()); // if javax.xml.transform is not available, fall back to standard Form message converter if (javaxXmlTransformPresent) { messageConverters.add(new SourceHttpMessageConverter<Source>()); messageConverters.add(new XmlAwareFormHttpMessageConverter()); } else { messageConverters.add(new FormHttpMessageConverter()); } if (simpleXmlPresent) { messageConverters.add(new SimpleXmlHttpMessageConverter()); } if (jackson2Present) { messageConverters.add(new MappingJackson2HttpMessageConverter()); } else if (jacksonPresent) { messageConverters.add(new MappingJacksonHttpMessageConverter()); } if (romePresent) { messageConverters.add(new SyndFeedHttpMessageConverter()); } }