javaBean转Xml字符串
1,给需要转Xml字符串的javaBean添加@XmlRootElement
注解
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class Student {
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class ClassRoom {
2,编写XMLUtil工具类
3,在Test类中编写函数进行测试
本次仓库提交:https://gitee.com/michael-first/commons_httpclient/commit/1b5e71fc10a8ed3e601bcee20b880567fcdcb9be