JavaBean toString() - 将bean对象打印成字符串

JavaBean toString方式

//方法一:自动生成
@Override
public String toString() {
return "ReportDataQo [eventCode=" + eventCode + ", reportDateFrom="
+ reportDateFrom + ", reportDateTo=" + reportDateTo
+ ", status=" + status + ", reportOrgCode=" + reportOrgCode
+ ", reportDeptType=" + reportDeptType + "]";
}


//方法二:序列化
/* @Override
public String toString() {
return com.alibaba.fastjson.JSON.toJSONString(this);
}*/