Jaxb annotation

Jaxb处理java对象和xml之间转换常用的annotation:

参考:http://blog.csdn.net/a9529lty/article/details/8232932

@XmlAccessorType

@XmlType

@XmlRootElement

package com.cares.asis.sso.ws;

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = { "userID", "userPwd" })
@XmlRootElement(name = "CheckAdUser")
public class CheckAdUser {

protected String userID;
protected String userPwd;

public String getUserID() {
return userID;
}

public void setUserID(String value) {
this.userID = value;
}

public String getUserPwd() {
return userPwd;
}

public void setUserPwd(String value) {
this.userPwd = value;
}

}

原文地址:https://www.cnblogs.com/ccEmily/p/5691016.html