When i was working with Zend Framework, I used to have .ini
configuration files, where I could do this:
[production]
setting1 = abc
setting2 = def
[development : production]
setting1 = ghi
And when I turned on the development
application profile then the setting1
had a value of ghi
, whereas in the prdouction mode it was abc
. Is is possible to define such inherited settings in Apache Commons Configuration?
I know that I can define multiple configuration files and create a CompositeConfiuration from them, but how to tell the application that it should include only specific files in different modes? I do not also have an idea how to set these application profiles yet but another setting called PROFILE
should do the work for me.
If possible, I would not want to split the settings in multiple files.
I can't find any information about how this should be done in Java.