You can simply use the enumeration name as the value, and Spring will automatically detect that it is a static field of the enumeration type and its use. For example, if you have enum com.mycompany.MyEnum with SOMEVAL, ANOTHERVAL values, you can use:
<property name="myEnumProperty" value="SOMEVAL" />
This will allow you to completely exclude FieldRetrievingFactoryBean and <util:constant> .
Alex marshall
source share