I have a Spring boot Application with Three Profiles. Lets Say dev,stage,prod. In Every profile I have a Configuration File and There is a Key like this:
client:
account:
"acc1":"1"
This "acc1" Key has Different Values in Every Profile. So there is Two Questions:
1: How I can store key/values based on profiles?
2: How I can read them in the Application?
Thanks for Your Advice.
You do not need to do anything for how to read key/values based on profile, you just need to define the profile in your command line and write application-dev.yml and application.yml for default values then spring will do the rest.
Just define those in the ymls and read like
References: