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 Android Security Essentials Live Lessons this week in the Android 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
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Creating a map in Spring with enum as keytpe
 
Similar Threads
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
declaring an enum based on an int?
problens in spring CustomDataEditor!