Enum Class ExceptionCode
- 所有已实现的接口:
Serializable,Comparable<ExceptionCode>,Constable,BaseExceptionCode
异常编码
1** 信息,服务器收到请求,需要请求者继续执行操作 2** 成功,操作被成功接收并处理 3** 重定向,需要进一步的操作以完成请求 4** 客户端错误,请求包含语法错误或无法完成请求 5** 服务器错误,服务器在处理请求的过程中发生了错误
业务编码规则: [系统]_[模块]_[功能]: 每段3位数,_只是java或js语言的语法糖,实际上的数字编码并不存在下划线
- 作者:
- zuihou
-
嵌套类概要
从类继承的嵌套类/接口 java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
枚举常量概要
枚举常量枚举常量说明访问资源 被禁止。404 Not Found.登录未授权。 -
方法概要
修饰符和类型方法说明intgetCode()异常编码getMsg()异常消息static ExceptionCodeReturns the enum constant of this class with the specified name.static ExceptionCode[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
枚举常量详细资料
-
SUCCESS
-
SYSTEM_BUSY
-
SYSTEM_TIMEOUT
-
PARAM_EX
-
SQL_EX
-
NULL_POINT_EX
-
ILLEGAL_ARGUMENT_EX
-
MEDIA_TYPE_EX
-
LOAD_RESOURCES_ERROR
-
BASE_VALID_PARAM
-
OPERATION_EX
-
SERVICE_MAPPER_ERROR
-
CAPTCHA_ERROR
-
JSON_PARSE_ERROR
-
OK
-
BAD_REQUEST
-
UNAUTHORIZED
登录未授权。 客户端在访问请求的资源之前,对token进行验证,token无法正常解析时,返回此错误码,可以简单的理解为没有登录此站。401 Unauthorized. 需要重新登录。 该HTTP状态码表示认证错误,它是为了认证设计的,而不是为了授权设计的。收到401响应,表示请求没有被认证—压根没有认证或者认证不正确—但是请重新认证和重试。(一般在响应头部包含一个WWW-Authenticate来描述如何认证)。通常由web服务器返回,而不是web应用。从性质上来说是临时的东西。(服务器要求客户端重试) -
FORBIDDEN
访问资源 被禁止。 资源不可用,服务器理解客户的请求,但拒绝处理它。通常由于服务器上文件或目录的权限设置导致,可以简单的理解为没有权限访问此站。 该HTTP状态码是关于授权方面的。从性质上来说是永久的东西,和应用的业务逻辑相关联。它比401更具体,更实际。收到403响应表示服务器完成认证过程,但是客户端请求没有权限去访问要求的资源。 -
NOT_FOUND
404 Not Found. -
METHOD_NOT_ALLOWED
-
TOO_MANY_REQUESTS
-
INTERNAL_SERVER_ERROR
-
BAD_GATEWAY
-
GATEWAY_TIMEOUT
-
JWT_USER_DISABLE
-
JWT_EMPLOYEE_DISABLE
-
JWT_TENANT_DISABLE
-
JWT_APPLICATION_FORBIDDEN
-
JWT_RESOURCE_FORBIDDEN
-
TRANSACTIONAL
-
REQUIRED_FILE_PARAM_EX
-
DATA_SAVE_ERROR
-
DATA_UPDATE_ERROR
-
TOO_MUCH_DATA_ERROR
-
JWT_BASIC_INVALID
-
JWT_TOKEN_EXPIRED
-
JWT_SIGNATURE
-
JWT_ILLEGAL_ARGUMENT
-
JWT_GEN_TOKEN_FAIL
-
JWT_PARSER_TOKEN_FAIL
-
JWT_USER_INVALID
-
JWT_USER_ENABLED
-
JWT_OFFLINE
-
JWT_NOT_LOGIN
-
-
方法详细资料
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- 返回:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- 参数:
name- 要返回的枚举常量的名称。- 返回:
- 返回带有指定名称的枚举常量
- 抛出:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- 如果参数为空值
-
getCode
public int getCode()从接口复制的说明:BaseExceptionCode异常编码- 指定者:
getCode在接口中BaseExceptionCode- 返回:
- 异常编码
-
getMsg
从接口复制的说明:BaseExceptionCode异常消息- 指定者:
getMsg在接口中BaseExceptionCode- 返回:
- 异常消息
-
build
-
param
-