类 Response<T>

java.lang.Object
cn.iosd.starter.web.domain.Response<T>
类型参数:
T - 响应体数据类型

public class Response<T> extends Object
响应信息主体
作者:
ok1996
  • 字段详细资料

    • SUCCESS

      public static final int SUCCESS
      成功
      另请参阅:
    • FAIL

      public static final int FAIL
      失败
      另请参阅:
  • 构造器详细资料

    • Response

      public Response()
  • 方法详细资料

    • ok

      public static <T> Response<T> ok()
    • ok

      public static <T> Response<T> ok(T data)
    • ok

      public static <T> Response<T> ok(T data, String msg)
    • fail

      public static <T> Response<T> fail()
    • fail

      public static <T> Response<T> fail(String msg)
    • fail

      public static <T> Response<T> fail(T data)
    • fail

      public static <T> Response<T> fail(T data, String msg)
    • fail

      public static <T> Response<T> fail(int code, String msg)
    • getCode

      public int getCode()
    • setCode

      public void setCode(int code)
    • getMsg

      public String getMsg()
    • setMsg

      public void setMsg(String msg)
    • getData

      public T getData()
    • setData

      public void setData(T data)
    • isError

      public static <T> Boolean isError(Response<T> ret)
    • isSuccess

      public static <T> Boolean isSuccess(Response<T> ret)