aspose file tools
The moose likes Spring and the fly likes Creating a map in Spring with enum as keytpe Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Reply Bookmark "Creating a map in Spring with enum as keytpe" Watch "Creating a map in Spring with enum as keytpe" New topic
Author

Creating a map in Spring with enum as keytpe

Pradeep bhatt
Ranch Hand

Joined: Feb 27, 2002
Posts: 8876

I have defined a map in spring config file with enum as key type. I am getting this error message

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mymap': Error converting typed String value for bean property 'mybean'; nested exception is org.springframework.beans.ConversionNotSupportedException: Failed to convert value of type 'java.lang.String' to required type 'MyEnum'.


Groovy
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Creating a map in Spring with enum as keytpe
 
Similar Threads
declaring an enum based on an int?
problens in spring CustomDataEditor!
Bootstrap to 10.31.8.104/10.31.8.104:7600 failed
Error while defining Constructor argument
Define enum as Spring Bean and dependency inject it into another Spring Bean