org.springframework.http.converter.xml

Class AbstractJaxb2HttpMessageConverter<T>

    • Constructor Detail

      • AbstractJaxb2HttpMessageConverter

        public AbstractJaxb2HttpMessageConverter()
    • Method Detail

      • createMarshaller

        protected final Marshaller createMarshaller(java.lang.Class<?> clazz)
        Create a new Marshaller for the given class.
        Parameters:
        clazz - the class to create the marshaller for
        Returns:
        the Marshaller
        Throws:
        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.
        Parameters:
        marshaller - the marshaller to customize
        Since:
        4.0.3
        See Also:
        createMarshaller(Class)
      • createUnmarshaller

        protected final Unmarshaller createUnmarshaller(java.lang.Class<?> clazz)
        Create a new Unmarshaller for the given class.
        Parameters:
        clazz - the class to create the unmarshaller for
        Returns:
        the Unmarshaller
        Throws:
        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.
        Parameters:
        unmarshaller - the unmarshaller to customize
        Since:
        4.0.3
        See Also:
        createUnmarshaller(Class)
      • getJaxbContext

        protected final JAXBContext getJaxbContext(java.lang.Class<?> clazz)
        Return a JAXBContext for the given class.
        Parameters:
        clazz - the class to return the context for
        Returns:
        the JAXBContext
        Throws:
        HttpMessageConversionException - in case of JAXB errors