I have a standalone enum type defined, something like this:
package my.pkg.types;
public enum MyEnumType {
TYPE1,
TYPE2
}
Now, I want to inject a value of that type into a bean property:
<bean name="someName" class="my.pkg.classes">
<property name="type" value="my.pkg.types.MyEnumType.TYPE1" />
</bean>
...and that didn't work :(
How should I Inject an Enum into a spring bean?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…