XStream多个对象与XML互相转换,并解决类名路径问题
XStream JAR包依赖版本
<dependency>
<groupId>com.thoughtworks.xstream</groupId>
<artifactId>xstream</artifactId>
<version>1.4.15</version>
</dependency>
多个对象转成XML报文
public static String simpleobject2xml(Object obj, Object... child) {
String xml = "";
try {