public class WrapperResponse<T> extends Object
| 构造器和说明 |
|---|
WrapperResponse() |
WrapperResponse(int code,
String msg) |
WrapperResponse(int code,
String bizCode,
String msg) |
WrapperResponse(T data) |
| 限定符和类型 | 方法和说明 |
|---|---|
static String |
buildErrorJSON(int code,
String msg) |
static <T> WrapperResponse<T> |
fail(Exception e) |
static <T> WrapperResponse<T> |
fail(int code,
String msg) |
static <T> WrapperResponse<T> |
fail(int code,
String bizCode,
String message) |
static <T> WrapperResponse<T> |
fail(String msg) |
String |
getBizCode() |
int |
getCode() |
Map<String,String> |
getContextParams() |
T |
getData() |
String |
getMsg() |
void |
setBizCode(String bizCode) |
void |
setCode(int code) |
void |
setContextParams(Map<String,String> contextParams) |
void |
setData(T data) |
void |
setMsg(String msg) |
static WrapperResponse<Void> |
success() |
static <T> WrapperResponse<T> |
success(T data) |
boolean |
successed() |
String |
toString() |
WrapperResponse<T> |
withContextParam() |
public WrapperResponse()
public WrapperResponse(int code,
String msg)
public WrapperResponse(T data)
public int getCode()
public void setCode(int code)
public String getBizCode()
public void setBizCode(String bizCode)
public String getMsg()
public void setMsg(String msg)
public T getData()
public void setData(T data)
public boolean successed()
public static WrapperResponse<Void> success()
public static <T> WrapperResponse<T> success(T data)
public static <T> WrapperResponse<T> fail(String msg)
public static <T> WrapperResponse<T> fail(int code, String bizCode, String message)
public static <T> WrapperResponse<T> fail(int code, String msg)
public static <T> WrapperResponse<T> fail(Exception e)
public WrapperResponse<T> withContextParam()
Copyright © 2025. All rights reserved.