Spring share same application.yaml with minor differences amoung multiple services

247 Views Asked by At

I have multiple services who's application.yaml file is nearly identical. Only few properties are different and some properties are extra in some and some are missing in some. So I end up copy pasting them and If I have to change one then I have to manually go and change all files and its getting out of hand

Is there any templating way with spring cloud config ?

1

There are 1 best solutions below

1
On

How about putting all the genuinely shared properties into a single external application.yml or application-profile.yml which will be common, i.e. used by all services?

Then put the discrete service properties into external serviceA.yml, serviceB.yml, ... etc.so that you have proper organisation and separation.