public enum SharedErrorCode extends Enum<SharedErrorCode> implements ErrorCodeProvider, HttpStatusProvider
| 枚举常量和说明 |
|---|
BAD_REQUEST |
CONFLICT |
FORBIDDEN |
INTERNAL_SERVER_ERROR |
METHOD_NOT_ALLOWED |
NOT_ACCEPTABLE |
NOT_FOUND |
UNAUTHORIZED |
UNEXPECTED_ERROR |
UNSUPPORTED_MEDIA_TYPE |
| 限定符和类型 | 方法和说明 |
|---|---|
String |
getErrorCode() |
org.springframework.http.HttpStatus |
getHttpStatus() |
static SharedErrorCode |
valueOf(String name)
返回带有指定名称的该类型的枚举常量。
|
static SharedErrorCode[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final SharedErrorCode BAD_REQUEST
public static final SharedErrorCode UNAUTHORIZED
public static final SharedErrorCode FORBIDDEN
public static final SharedErrorCode NOT_FOUND
public static final SharedErrorCode METHOD_NOT_ALLOWED
public static final SharedErrorCode NOT_ACCEPTABLE
public static final SharedErrorCode CONFLICT
public static final SharedErrorCode UNSUPPORTED_MEDIA_TYPE
public static final SharedErrorCode INTERNAL_SERVER_ERROR
public static final SharedErrorCode UNEXPECTED_ERROR
public static SharedErrorCode[] values()
for (SharedErrorCode c : SharedErrorCode.values()) System.out.println(c);
public static SharedErrorCode valueOf(String name)
name - 要返回的枚举常量的名称。IllegalArgumentException - 如果该枚举类型没有带有指定名称的常量NullPointerException - 如果参数为空值public org.springframework.http.HttpStatus getHttpStatus()
getHttpStatus 在接口中 HttpStatusProviderpublic String getErrorCode()
getErrorCode 在接口中 ErrorCodeProviderCopyright © 2015. All rights reserved.