Hi all,
I have read the merging rules for typesafe config's Config and Array types, but I've hit a deadend and need some help.
In my config setup, I define properties like this
mongo {
name: "database"
connections: 50
concern: SAFE
hosts {
"mongodb.host.1": 27017
"mongodb.host.2": 27017
"mongodb.host.3": 27017
}
}
now the idea is that, by utilising ConfigFactory.load("local").withFallback(ConfigFactory.load()), I want users to be able to override the "hosts". (As an aside, the double quotes show up in the name of the key when iterating the entrySet, and I have to replaceAll to remove them).
But of course, what happens is the user's settings just gets merged with the defaults - which is not what I want.
Can anyone suggest an alternative to fallback merging? Incidentally, I do still want to have the defaults as they will suit fine in most cases, and it also allows users to override just one aspect of the config.