Enum Class CommonCode

java.lang.Object
java.lang.Enum<CommonCode>
red.mulan.boot.common.code.CommonCode
所有已实现的接口:
Serializable, Comparable<CommonCode>, Constable, Result

public enum CommonCode extends Enum<CommonCode> implements Result
公共状态码
从以下版本开始:
2023/2/17 20:51
版本:
1.0.0
作者:
Max
  • 枚举常量详细资料

    • SUCCESS

      public static final CommonCode SUCCESS
      操作成功
    • FAIL

      public static final CommonCode FAIL
      操作失败
    • ERROR

      public static final CommonCode ERROR
      系统错误
    • UNAUTHORIZED

      public static final CommonCode UNAUTHORIZED
      未授权
    • FORBIDDEN

      public static final CommonCode FORBIDDEN
      权限不足
    • REQUEST_METHOD_NOT_SUPPORTED

      public static final CommonCode REQUEST_METHOD_NOT_SUPPORTED
      请求方式错误
    • REQUIRED_REQUEST_BODY_IS_MISSING

      public static final CommonCode REQUIRED_REQUEST_BODY_IS_MISSING
      没有请求正文
    • USERNAME_OR_PASSWORD_ERROR

      public static final CommonCode USERNAME_OR_PASSWORD_ERROR
      用户名或者密码错误
    • LOG_OUT_SUCCESS

      public static final CommonCode LOG_OUT_SUCCESS
      退出成功
  • 方法详细资料

    • values

      public static CommonCode[] 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

      public static CommonCode valueOf(String name)
      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 name
      NullPointerException - 如果参数为空值
    • code

      public String code()
      返回自定义请求状态码
      指定者:
      code 在接口中 Result
      返回:
      返回自定义状态码
    • success

      public Boolean success()
      返回是否成功
      指定者:
      success 在接口中 Result
      返回:
      是否成功
    • message

      public String message()
      返回提示信息
      指定者:
      message 在接口中 Result
      返回:
      提示信息