Did Spring abandon YAML to use as an alternative to .properties / .xml because of:
[Spring Developer]: …YAML was considered, but we thought that counting whitespace significant was a support nightmare in the making… [reference from spring forum]
I am confident YAML makes a lot of sense for properties, and I am using it currently on the project, but have difficulties to inject properties in a
<property name="productName" value="${client.product.name}" />
fashion.
Anything I am missing, or I should create a custom YamlPropertyPlaceholderConfigurer ?
I don’t know if this is a bit too late but no – you don’t have to implement whole YamlPropertyPlaceholderConfigurer instead you can simply create custom PropertiesPersister and add it as optional parameter.
Here’s how your configuration will look
And here’s bare-bone (read-only) implementation using SnakeYaml, feel free to add what you need including error handling
As added benefit – here’s how I create Yaml instance
You can also read this in my blog