I am using configuration file segment profile-specific like :
spring:
config:
activate:
on-profile: tenant1
some-property: value1
spring:
config:
activate:
on-profile: tenant2
some-property: value2
and then there is POST request in which 'some-property' field will come, based on which I want to activate the profile. Request format is:
{ some-property: value2 }
In the above request the value of 'some-property' is value2, so second profile should be selected because the value of 'some-property' is the request is value2 which matches with one of the property of profile tenant2. So profile tenant2 will be selected.