We have 4 regions in which our system is installed
- Europe
- USA
- ASIA
- Japan
Each region has 3 types of environment
- dev
- test
- prod
For each environment we have property file where we are specifying configurations for instances. In whole we have now 12 files with huge amount of properties. The problem is that it is very hard to handle changes in properties files and manage them.
Does anybody know any tool that could help to edit/add/delete pr开发者_StackOverflow中文版operties with minimal manual work?
You could manage this using version controlled template and substitution files.
A template file would contain all properties, with markers for values to be substituted
some.property.never.changes=Literal value
some.property.which.changes=--A_SUBSTITUTION_KEY--
another.property.never.changes=Literal value
another.property.which.changes=--ANOTHER_SUBSTITUTION_KEY--
A substitution file would contain substitution values for a particular instance
A_SUBSTITUTION_KEY=A literal value
ANOTHER_SUBSTITUTION_KEY=Another literal value
Easy to merge substitution values into template creating a new file using build tool such as Ant.
You could choose to version control just the template and substitution files, or you could choose to version control the merged output files.
精彩评论