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

前端 未结 9 956
遥遥无期
遥遥无期 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:28

    Have you tried just "TYPE1"? I suppose Spring uses reflection to determine the type of "type" anyway, so the fully qualified name is redundant. Spring generally doesn't subscribe to redundancy!

提交回复
热议问题