I have application.yml
spring.active.profile=default,dev
api-url: http://dev-api.com
I have another file application-mock.yml which has below api-url related to wiremock.
application-mock.yml
api-url: http://localhost:7845
I have requirement to provide the developer/tester to use mock api-url or real api url from test environment based on their needs. We have central puppet configuration file test.yml which has below content which will call real api properly and it works as expected currently.
test.yml
spring.active.profile=default,test
api-url: http://test-api.com
Now, i need to provide the option to use mock-api url from test envionment. I cant edit api-url in test.yaml in puppet configuration to point to http://localhost:7845
because it affect functionality on calling real api.
I want to make real api and mock api also should work based on developer/tester needs instead of changing or committing test.yml.
my spring java service contains value annotation for api-url to retrieve url.
Kindly provide me your valuable input.