【发布时间】:2018-02-28 06:47:53
【问题描述】:
我已经创建了这样的枚举:所以我想在我的应用程序运行时添加另一个枚举,例如:“BLOCKED”..请帮助。
public enum LoginStatus {
LOGGEDIN("LOGGEDIN", "Loggedin"),
LOGOUT("LOGOUT", "Logout");
private final String value;
private final String description;
LoginStatus(String value, String description) {
this.value = value;
this.description = description;
}
public String value() {
return this.value;
}
public String getReasonPhrase() {
return this.description;
}
@Override
public String toString() {
return this.value;
}
}
【问题讨论】:
标签: spring-boot enums