| 程序包 | 说明 |
|---|---|
| xyz.shodown.common.response | |
| xyz.shodown.common.util.io |
| 限定符和类型 | 方法和说明 |
|---|---|
static Result<?> |
Result.fail(ResponseEnum respEnum)
失败,枚举内容返回
|
static <T> Result<T> |
Result.fail(Serializable code,
String msg)
失败,返回码值与消息
|
static Result<?> |
Result.fail(String msg)
失败,自定义失败消息
|
static Result<?> |
Result.success()
成功,无数据返回
|
static <T> Result<T> |
Result.success(Serializable code,
String msg,
T t)
成功,并返回数据与自定义code和message
|
static <T> Result<T> |
Result.success(Serializable code,
T t)
成功,自定义code
|
static <T> Result<T> |
Result.success(String msg,
T t)
成功,并返回数据与自定义message
|
static <T> Result<T> |
Result.success(T t)
成功,并返回数据
|
| 限定符和类型 | 方法和说明 |
|---|---|
static void |
ResponseUtil.out(javax.servlet.ServletResponse response,
Result<?> result)
使用response输出JSON
|
Copyright © 2022. All rights reserved.