I have an enum defined as
i had defined the enum as property to a bean as follows;Code:public enum Monsoon { SPRING(1), SUMMER(2), AUTUMN(3), FALL(4), WINTER(5); private final Integer seasonId; public Integer seasonId() { return seasonId; } private Monsoon(Integer seasonId) { this.seasonId = seasonId; } }
But the above throws an exception saying SPRING no property or field definitionCode:<bean id="weather" class="org.weather.WeatherIntereceptor"> <property name="seasonId"> <value type="org.weather.Monsoon">#{SPRING.seasonId}</value> </property> </bean>
Where am i going wrong ?


Reply With Quote
