spring-framework / org.springframework.oxm.jaxb / Jaxb2Marshaller / setCheckForXmlRootElement

setCheckForXmlRootElement

open fun setCheckForXmlRootElement(checkForXmlRootElement: Boolean): Unit

Specify whether the #supports(Class) should check for XmlRootElement annotations.

Default is true, meaning that supports(Class) will check for this annotation. However, some JAXB implementations (i.e. EclipseLink MOXy) allow for defining the bindings in an external definition file, thus keeping the classes annotations free. Setting this property to false supports these JAXB implementations.

See Also
#supports(Class)#supports(Type)