于紫祥_1901
2020-09-10 5476f8bcf411ce654c02fbd34b9086518adbd917
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package com.moral.security.common;
 
import com.fasterxml.jackson.annotation.JsonValue;
 
/**
 * Enumeration of REST Error types.
 * 
 * @author vladimir.stankovic
 *
 *         Aug 3, 2016
 */
public enum ErrorCode {
    GLOBAL(2),
 
    AUTHENTICATION(10), JWT_TOKEN_EXPIRED(11),ACCOUNT_EXPIRED(12);
    
    private int errorCode;
 
    private ErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }
 
    @JsonValue
    public int getErrorCode() {
        return errorCode;
    }
}