Sample code from http://camel.apache.org/xstream.html
If you would like to configure the XStream instance used by the Camel for the message transformation, you can simply pass a reference to that instance on the DSL level.
XStream xStream = new XStream();
xStream.aliasField("money", PurchaseOrder.class, "cash");
// new Added setModel option since Camel 2.14
xStream.setModel("NO_REFERENCES");
...
from("direct:marshal").
marshal(new XStreamDataFormat(xStream)).
to("mock:marshaled");
But this code is wrong, because org.apache.camel.model.dataformat.XStreamDataFormat constructor accept only String. How to configure custom com.thoughtworks.xstream.XStream in camel?
I dont want to use XML, my application is using Spring.