File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Spring
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: 8904

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
Bootstrap to 10.31.8.104/10.31.8.104:7600 failed
Define enum as Spring Bean and dependency inject it into another Spring Bean
declaring an enum based on an int?
problens in spring CustomDataEditor!
Error while defining Constructor argument