XML Marshalling
MarshallingView`使用一个 XML `Marshaller
(在`org.springframework.oxm`包中定义)来将响应内容渲染为 XML。你可以通过使用 `MarshallingView`实例的 `modelKey`bean 属性来明确设置要编组的对此。或者,视图可以遍历所有模型属性,并编组第一个由 `Marshaller`支持的类型。有关`org.springframework.oxm`包中功能的更多信息,请参阅 Marshalling XML using O/X Mappers。
The MarshallingView
uses an XML Marshaller
(defined in the org.springframework.oxm
package) to render the response content as XML. You can explicitly set the object to be
marshalled by using a MarshallingView
instance’s modelKey
bean property. Alternatively,
the view iterates over all model properties and marshals the first type that is supported
by the Marshaller
. For more information on the functionality in the
org.springframework.oxm
package, see Marshalling XML using O/X Mappers.