Java spring如何管理枚举?

Java spring如何管理枚举?,java,spring,enumeration,Java,Spring,Enumeration,我的想法是让spring在数组中加入EArith枚举加法、减法、乘法和除法,请问,如何实现?可能的重复?您需要详细说明您的问题以获得好的答案。为什么要自动连接枚举数组?这方面的实际使用案例是什么?可能重复的问题需要详细说明才能得到好的答案。为什么要自动连接枚举数组?这个的实际用例是什么? //Can not add @Component annotations, error Public enum EArith { ADD, SUBTRACT, MULTIPLY, DIVIDE } @

我的想法是让spring在数组中加入EArith枚举加法、减法、乘法和除法,请问,如何实现?

可能的重复?您需要详细说明您的问题以获得好的答案。为什么要自动连接枚举数组?这方面的实际使用案例是什么?可能重复的问题需要详细说明才能得到好的答案。为什么要自动连接枚举数组?这个的实际用例是什么?
//Can not add  @Component annotations, error
Public enum EArith {
   ADD, SUBTRACT, MULTIPLY, DIVIDE
}

@Component
Public class Test{
  @Autowired
  EArith[] eAriths; // error
}