类 MarshallingHttpMessageConverter

所有已实现的接口:
HttpMessageConverter<Object>

public class MarshallingHttpMessageConverter extends AbstractXmlHttpMessageConverter<Object>
Implementation of HttpMessageConverter that can read and write XML using Infra Marshaller and Unmarshaller abstractions.

This converter requires a Marshaller and Unmarshaller before it can be used. These can be injected by the constructor or bean properties.

By default, this converter supports text/xml and application/xml. This can be overridden by setting the supportedMediaTypes property.

从以下版本开始:
4.0
作者:
Arjen Poutsma
  • 字段详细资料

    • marshaller

      @Nullable private cn.taketoday.oxm.Marshaller marshaller
    • unmarshaller

      @Nullable private cn.taketoday.oxm.Unmarshaller unmarshaller
  • 构造器详细资料

    • MarshallingHttpMessageConverter

      public MarshallingHttpMessageConverter()
      Construct a new MarshallingHttpMessageConverter with no Marshaller or Unmarshaller set. The Marshaller and Unmarshaller must be set after construction by invoking setMarshaller(Marshaller) and setUnmarshaller(Unmarshaller).
    • MarshallingHttpMessageConverter

      public MarshallingHttpMessageConverter(cn.taketoday.oxm.Marshaller marshaller)
      Construct a new MarshallingMessageConverter with the given Marshaller set.

      If the given Marshaller also implements the Unmarshaller interface, it is used for both marshalling and unmarshalling. Otherwise, an exception is thrown.

      Note that all Marshaller implementations in Infra also implement the Unmarshaller interface, so that you can safely use this constructor.

      参数:
      marshaller - object used as marshaller and unmarshaller
    • MarshallingHttpMessageConverter

      public MarshallingHttpMessageConverter(cn.taketoday.oxm.Marshaller marshaller, cn.taketoday.oxm.Unmarshaller unmarshaller)
      Construct a new MarshallingMessageConverter with the given Marshaller and Unmarshaller.
      参数:
      marshaller - the Marshaller to use
      unmarshaller - the Unmarshaller to use
  • 方法详细资料