类 CodeResult<T>
java.lang.Object
org.springframework.http.HttpEntity<T>
org.springframework.http.ResponseEntity<T>
cloud.opencode.base.basecode.CodeResult<T>
- 所有已实现的接口:
Serializable
public class CodeResult<T>
extends org.springframework.http.ResponseEntity<T>
implements Serializable
- 作者:
- Jon url: Jon's blog url: OpenCode.cloud
- 另请参阅:
-
嵌套类概要
从类继承的嵌套类/接口 org.springframework.http.ResponseEntity
org.springframework.http.ResponseEntity.BodyBuilder, org.springframework.http.ResponseEntity.HeadersBuilder<B extends org.springframework.http.ResponseEntity.HeadersBuilder<B>> -
字段概要
字段修饰符和类型字段说明private Integerprivate Tprivate Stringprivate Longprivate Longprivate static final longprivate Long从类继承的字段 org.springframework.http.HttpEntity
EMPTY -
构造器概要
构造器构造器说明CodeResult(org.springframework.http.HttpStatusCode status) CodeResult(org.springframework.util.MultiValueMap<String, String> headers, org.springframework.http.HttpStatusCode status) CodeResult(T body, org.springframework.http.HttpStatusCode status) CodeResult(T body, org.springframework.http.HttpStatusCode status, Integer code) CodeResult(T body, org.springframework.http.HttpStatusCode status, String message) CodeResult(T body, org.springframework.http.HttpStatusCode status, String message, Integer code) CodeResult(T body, org.springframework.http.HttpStatusCode status, String message, Long total, Long page, Long pageSize) CodeResult(T body, org.springframework.http.HttpStatusCode status, String message, Long total, Long page, Long pageSize, Integer code) CodeResult(T body, org.springframework.util.MultiValueMap<String, String> headers, int rawStatus) CodeResult(T body, org.springframework.util.MultiValueMap<String, String> headers, org.springframework.http.HttpStatusCode statusCode) -
方法概要
修饰符和类型方法说明static CodeResultERRORstatic CodeResultERRORstatic CodeResultOK()OKstatic CodeResultOKstatic CodeResultOK(org.springframework.util.MultiValueMap<String, String> headers, org.springframework.http.HttpStatusCode status) OKstatic <T> CodeResultOK(T data) OKstatic <T> CodeResultOKstatic <T> CodeResultOKstatic <T> CodeResultOKstatic <T> CodeResultOKstatic <T> CodeResultOKstatic <T> CodeResultOK(T body, org.springframework.util.MultiValueMap<String, String> headers, org.springframework.http.HttpStatusCode statusCode) OK从类继承的方法 org.springframework.http.ResponseEntity
accepted, badRequest, created, equals, getStatusCode, getStatusCodeValue, hashCode, internalServerError, noContent, notFound, of, of, ofNullable, ok, ok, status, status, toString, unprocessableEntity从类继承的方法 org.springframework.http.HttpEntity
getBody, getHeaders, hasBody
-
字段详细资料
-
serialVersionUID
private static final long serialVersionUID- 另请参阅:
-
data
-
code
-
message
-
total
-
page
-
pageSize
-
-
构造器详细资料
-
CodeResult
public CodeResult(org.springframework.http.HttpStatusCode status) -
CodeResult
-
CodeResult
-
CodeResult
-
CodeResult
-
CodeResult
-
CodeResult
-
CodeResult
-
CodeResult
-
CodeResult
-
-
方法详细资料
-
OK
OK- 返回:
-
OK
OK- 类型参数:
T-- 参数:
data-- 返回:
-
OK
OK- 类型参数:
T-- 参数:
data-message-- 返回:
-
OK
OK- 类型参数:
T-- 参数:
data-message-code-- 返回:
-
OK
OK- 类型参数:
T-- 参数:
data-message-total-page-pageSize-- 返回:
-
OK
public static <T> CodeResult OK(T data, String message, Long total, Long page, Long pageSize, Integer code) OK- 类型参数:
T-- 参数:
data-message-total-page-pageSize-code-- 返回:
-
OK
OK- 参数:
message-code-- 返回:
-
OK
public static <T> CodeResult OK(@Nullable T body, org.springframework.util.MultiValueMap<String, String> headers, int rawStatus) OK- 类型参数:
T-- 参数:
body-headers-rawStatus-- 返回:
-
OK
public static CodeResult OK(@Nullable org.springframework.util.MultiValueMap<String, String> headers, org.springframework.http.HttpStatusCode status) OK- 参数:
headers-status-- 返回:
-
OK
public static <T> CodeResult OK(@Nullable T body, org.springframework.util.MultiValueMap<String, String> headers, org.springframework.http.HttpStatusCode statusCode) OK- 类型参数:
T-- 参数:
body-headers-statusCode-- 返回:
-
ERROR
ERROR- 参数:
message-status-- 返回:
-
ERROR
ERROR- 参数:
message-- 返回:
-