public enum Task {
GOODS1(1600, 0.025),
GOODS2(400, 0.11);
private double a;
private double b;
private Task(double a, double b) {
this.a = a;
this.b = b;
}
public double getA() {
return a;
}
public void setA(double a) {this.a = a;}
public double getB() {
return b;
}
}
如上,我想要使用Spring来配置上述Task中的GOOD1和GOOD2中a, b的值,跪求如何实现?