package util;
public class ResponseUtil {
private Integer code;// 状态码
private Boolean status;// 状态
private String msg;// 消息
private Object data;// 数据对象
/**
* 无参构造器
*/
public ResponseUtil() {
super();
}
/**
* 只返回状态,状态码,消息
*
* @param status
* @param code
* @param msg
*/
public ResponseUtil(Boolean status, Integer code, String msg) {
super();
this.status = status;
this.code = code;
this.msg = msg;
}
/**
* 只返回状态,状态码,数据对象
*
* @param status
* @param code
* @param data
*/
public ResponseUtil(Boolean status, Integer code, Object data) {
super();
this.status = status;
this.code = code;
this.data = data;
}
/**
* 只返回状态码,信息,数据对象
*
* @param status
* @param code
* @param data
*/
public ResponseUtil(Integer code, String msg, Object data) {
super();
this.code = code;
this.msg = msg;
封装Json数据返回
最新推荐文章于 2024-07-18 15:16:38 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)