1 package top.infra.core;
2
3 import top.infra.localization.LocalizedMessages;
4
5 /**
6 * Created by zhuowan on 2016/12/29 10:22.
7 * Description: Web Project APIs Response bean should implements this interface
8 */
9 public interface ErrorCode {
10
11 String getName();
12
13 ErrorMessage getMessage();
14
15 default String getLocalizedMessage() {
16 return LocalizedMessages.getMessageByLocale(this.getMessage(), null);
17 }
18
19 int getValue();
20 }