and this in service B Event B{ String k; ClaSs2 j;// No same class but interconvertable }
I want to handle the event from service A in service B, ignoring Class1 that service B doesn’t know about. However xstream will complain. So I’m looking for a converter implementation that will just ignore the fields that it doesn’t find in service B and go on with the conversion.
If you’re on Spring and don’t want to mess up autoconfiguration, you can use the following:
(may contain typos, not copied from IDE) @Autowired
public void configSerializer(XStreamSerializer serializer) {
serializer.getXStream().ignoreUnknownElements();
}