io.github.wj0410.cloudbox.tools.result.ResultCode Maven / Gradle / Ivy
The newest version!
package io.github.wj0410.cloudbox.tools.result;
/**
* @author wangjie
* @version 1.0
* date 2021年08月03日09时34分
*/
public enum ResultCode implements IResultCode {
SUCCESS(200, "SUCCESS"),
FAILURE(400, "业务异常"),
INVALID_PARAM(400, "Invalid Request Parameters"),
PARAM_EMPTY(400, "缺少必要的请求参数 %s"),
VALIDATION(400, "参数验证不通过"),
REQUEST_TIMEOUT(408, "Request Timeout"),
REQUEST_ENTITY_TOO_LARGE(413, "Request Entity Too Large"),
INTERNAL_SERVER_ERROR(500, "系统错误,请联系管理员");
final int code;
final String message;
ResultCode(int code, String message) {
this.code = code;
this.message = message;
}
@Override
public String getMessage() {
return this.message;
}
@Override
public int getCode() {
return this.code;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy