此内容没有您所选择的语言版本。
13.9.11. Use XStream to Populate an Object Graph
Procedure 13.4. Task
- Configure XStream on an action:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow In the above example, there is also an example of how to specify non-default named locations for the request parameters Map and response object instance. - Specify any field name mappings and XStream annotated classes:
<property name="responseXStreamConfig"> <fieldAlias name="header" class="com.acme.order.Order" fieldName="headerFieldName" /> <annotation class="com.acme.order.Order" /> </property>
<property name="responseXStreamConfig"> <fieldAlias name="header" class="com.acme.order.Order" fieldName="headerFieldName" /> <annotation class="com.acme.order.Order" /> </property>
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Field mappings can be used to map XML elements onto Java fields on occasions when the local name of the element does not correspond to the field name in the Java class.