Spring Oxm allows you to use different marshallers/unmarshallers and Castor is one of them.
By default castor marshalles xml documents unindented and official documents tell that putting a castor.properties file in the search locations including the line org.exolab.castor.indent=true
will override the default behavior.
Now, when using Spring Oxm in a web application (Spring Batch Admin) how can I override the castor.properties in the castor jar?
I have the following bean configurations (extra lines removed) and they do not have the necessary properties to set for this as far as I can see.
<bean id="myCastorMarshaller"
class="org.springframework.oxm.castor.CastorMarshaller">
<property name="mappingLocation" value="classpath:/mapping/my-mapping.xml" />
</bean>
<bean id="myXmlWriter"
class="org.springframework.batch.item.xml.StaxEventItemWriter">
<property name="marshaller" ref="myCastorMarshaller" />
</bean>