Skip to content
Advertisement

map yaml config to a java hashmap

I have below in my yaml

JavaScript

I am map it in my spring bean as follow,

JavaScript

I get below error,

Cannot convert value of type [java.lang.String] to required type [java.util.Map]: no matching editors or conversion strategy found

How can I map a configuration map representation to a java hashmap?

Advertisement

Answer

In yaml try to format it in this way:

JavaScript

Or try this way:

JavaScript
JavaScript
User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement