Hi, I'm quite new to Spring. I have the following which results in an error
public enum AppParameters {ORGANISATION, DESCRIPTION, STATUS}
public enum AppStatuses {LIVE, PRELIVE}
<util:map id="myMap" key-type="AppParameters">
<entry key="ORGANISATION" value="AnOrg" />
<entry key="DESCRIPTION" value="ADescription" />
<entry key="STATUS" value="AppStatuses.LIVE" />
</util:map>
This result in a ClassCastException because AppStatuses.LIVE is being treated as a String.
WARNING: java.lang.String cannot be cast to AppStatuses
Replacing the "value" with "ref" results in a Sax error, Attribute ref is not allowed to appear in element 'entry'
I want to inject an AppStatuses enum into the STATUS value on myMap. How can I achieve this?
Thanks
Ben


Reply With Quote
