使用lombok注解的DTO,接受数据的DTO注解可以如下使用
@Data
@XmlRootElement(name = "xml")
@XmlAccessorType(XmlAccessType.FIELD)
public class WeChatEventXMLReceiveDTO {
@XmlElement(name = "ToUserName")
private String toUserName;
@XmlElement(name = "FromUserName")
private String fromUserName;
@XmlElement(name = "CreateTime")
private String createTime;
@XmlElement(name = "MsgType")
private String msgType;
@XmlElement(name = "Event")
private String event;
@XmlElement(name = "Content")
private String content;
@XmlElement(name = "MsgId")
private String msgId;
}