Java 类org.springframework.http.converter.xml.XmlAwareFormHttpMessageConverter 实例源码

项目:ShoppingMall    文件:RestTemplate.java   
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());
    }
}
项目:class-guard    文件:AnnotationMethodHandlerAdapter.java   
public AnnotationMethodHandlerAdapter() {
    // no restriction of HTTP methods by default
    super(false);

    // See SPR-7316
    StringHttpMessageConverter stringHttpMessageConverter = new StringHttpMessageConverter();
    stringHttpMessageConverter.setWriteAcceptCharset(false);
    this.messageConverters = new HttpMessageConverter[]{new ByteArrayHttpMessageConverter(), stringHttpMessageConverter,
            new SourceHttpMessageConverter(), new XmlAwareFormHttpMessageConverter()};
}
项目:jresplus    文件:ExtendableAnnotationMethodHandlerAdapter.java   
@SuppressWarnings("rawtypes")
public ExtendableAnnotationMethodHandlerAdapter() {
    // no restriction of HTTP methods by default
    super(false);

    // See SPR-7316
    StringHttpMessageConverter stringHttpMessageConverter = new StringHttpMessageConverter();
    stringHttpMessageConverter.setWriteAcceptCharset(false);
    this.messageConverters = new HttpMessageConverter[] {
            new ByteArrayHttpMessageConverter(),
            stringHttpMessageConverter, new SourceHttpMessageConverter(),
            new XmlAwareFormHttpMessageConverter() };
}