Description
Karthik Gurumurthy opened SPR-6037 and commented
This is about XStreamMarshaller.
XStream allows you to customize XStream by specifying a MapperWrapper like so -
class MyXStream extends XStream {
@Override
protected MapperWrapper wrapMapper(MapperWrapper next) {
// TODO Auto-generated method stub
return new MyClassMapper(next);
}
}
But Spring 3.x XStreamMarshaller instantiates a XStream instance by default.
So I'm not sure how we can supply our MapperWrapper .
I was wondering if Spring 3.x can provide a hook method that allows one to return their own custom XStream instance.
Or an option to specify our XStream subclass class. (XStreamMarsheller.setXStreamClass(Class xstreamClass);
You can probably use XStream.class by default.
I guess you guys know best how to achieve this.
I see that a method
protected void customizeXStream(com.thoughtworks.xstream.XStream xstream)
exists on XStreamMarshaller. But what I was looking for is a hook that allows us to specify our own XStream custom subclass.
Since Spring 3.x is not final yet, I was wondering if this hook can be added.
thanks!
Affects: 3.0 M4
Referenced from: commits 5c2d637