Problem: Option 2 works but with option 1 it looks like Spring is parsing
application.yml
application.yml
first and only then substitutes environment values this way treating
YAML_TEST_MAP
YAML_TEST_MAP
as a String making it throw this error:
No converter found capable of converting from type [java.lang.String] to type [java.util.Map<java.lang.String, java.lang.String>]
No converter found capable of converting from type [java.lang.String] to type [java.util.Map<java.lang.String, java.lang.String>]
Question: Is there a way to force Spring replace environment variables first and only then parse? Is there a way to tell Spring to treat value as a rest of yaml document?