类 AbstractJaxb2HttpMessageConverter<T>

类型参数:
T - the converted object type
所有已实现的接口:
HttpMessageConverter<T>
直接已知子类:
Jaxb2CollectionHttpMessageConverter, Jaxb2RootElementHttpMessageConverter

public abstract class AbstractJaxb2HttpMessageConverter<T> extends AbstractXmlHttpMessageConverter<T>
Abstract base class for HttpMessageConverters that use JAXB2. Creates JAXBContext object lazily.
从以下版本开始:
4.0
作者:
Arjen Poutsma, Rossen Stoyanchev
  • 字段详细资料

  • 构造器详细资料

    • AbstractJaxb2HttpMessageConverter

      public AbstractJaxb2HttpMessageConverter()
  • 方法详细资料

    • createMarshaller

      protected final Marshaller createMarshaller(Class<?> clazz)
      Create a new Marshaller for the given class.
      参数:
      clazz - the class to create the marshaller for
      返回:
      the Marshaller
      抛出:
      HttpMessageConversionException - in case of JAXB errors
    • customizeMarshaller

      protected void customizeMarshaller(Marshaller marshaller)
      Customize the Marshaller created by this message converter before using it to write the object to the output.
      参数:
      marshaller - the marshaller to customize
      另请参阅:
    • createUnmarshaller

      protected final Unmarshaller createUnmarshaller(Class<?> clazz)
      Create a new Unmarshaller for the given class.
      参数:
      clazz - the class to create the unmarshaller for
      返回:
      the Unmarshaller
      抛出:
      HttpMessageConversionException - in case of JAXB errors
    • customizeUnmarshaller

      protected void customizeUnmarshaller(Unmarshaller unmarshaller)
      Customize the Unmarshaller created by this message converter before using it to read the object from the input.
      参数:
      unmarshaller - the unmarshaller to customize
      另请参阅:
    • getJaxbContext

      protected final JAXBContext getJaxbContext(Class<?> clazz)
      Return a JAXBContext for the given class.
      参数:
      clazz - the class to return the context for
      返回:
      the JAXBContext
      抛出:
      HttpMessageConversionException - in case of JAXB errors