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

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 ?



Solution 1:[1]

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.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 MHennessy