Is there any way how to "build" bootstrap.yml
from multiple yaml
files?
Here is my scenario, I have a bunch of micro-services
and every service had the same bootstrap.yml
properties expect spring.application.name
.
I would like to split my bootstrap.yml
into two files, base-bootstrap.yml
which contains config service configuration like URI, password ... etc and then bootstrap.yml
which could contain spring.application.name
or whatever else.
base-bootstrap.yml
file could be externalized in some dependency jar and should be used like default, bootstrap.yml
should override any value. Here is some sample:
base-boostrap.yml
spring:
cloud:
config:
label: develop
uri: http://config
password: ${CONFIG_SERVICE_PASSWORD:password}
fail-fast: true
---
spring:
profiles: production
cloud:
config:
label: master
password: ${CONFIG_SERVICE_PASSWORD}
---
spring:
profiles: development
cloud:
config:
uri: http://localhost:8888
bootstrap.yml
spring:
application.name: sample-service
cloud:
config:
label: release/1.0.1
---
spring:
profiles: production
cloud:
config:
label: 1.1.0
Could anyone please guide me how to do it?