How to assign bean's property an Enum value in Spring config file?

前端 未结 9 953
遥遥无期
遥遥无期 2020-11-28 06:16

I have a standalone enum type defined, something like this:

package my.pkg.types;

public enum MyEnumType {
    TYPE1,
    TYPE2
}

Now, I w

9条回答
  •  囚心锁ツ
    2020-11-28 06:24

    I know this is a really old question, but in case someone is looking for the newer way to do this, use the spring util namespace:

    
    

    As described in the spring documentation.

提交回复
热议问题