Recently we had a requirement to inject an enum into a spring bean. To inject all the values of the enum we did the following
<bean id="elementTypes" factory-method="values">
and the following attribute in the spring bean was defined as
public class CompanyScoreMasterStatement implements CompanyEventStatement {
private EPStatement statement;
@Resource
private ScoreElementType[] elementTypes;

Posted on Saturday, June 12, 2010
0