• Post Reply Bookmark Topic Watch Topic
  • New Topic

Creating a map in Spring with enum as keytpe

Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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'.
my overalls have superpowers - they repel people who think fashion is important. Tiny ad:
the new thread boost feature brings a LOT of attention to your favorite threads
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!