Force Spring Yaml configuration environment parameter to be treated as yaml instead of String
Intro:
I have a Spring Boot application with its configuration set up with application.yml file like so:
- Scala class:
-
application.yml
:
- YAML_TEST_MAP
environment variable:
Problem:
Option 2 works but with option 1 it looks like Spring is parsing application.yml
first and only then substitutes environment values this way treating YAML_TEST_MAP
as a String making it throw this error:
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?4 Replies
Hey, @Lil Villa!
Please remember to
/close
this post once your question has been answered!Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Thank you for an answer :prayge:
💤
Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one.