我有一个enum
,我需要用spring bean注入它。
我的枚举是:
public enum Status {
IN_PROCESS(1,"In process"),
DONE(0,"Successful"),
CANNOT_DONE(2,"Unsuccessful");
private final int code;
private final String description;
private Status(int code, String description){
this.code = code;
this.description = description;
}
public int getCode() {
return code;
}
public String getDescription() {
return description;
}
}
我bean.xml
应该是什么样子的enum
..
谢谢。