I think the trick is to just use one property place holder and I think this covers all of your scenarios:
It resolves ${full.url}
in this way:
- first default.properties gets loaded =>
full.url=http://prod:9090
- then dev-test.properties overrides the hostname and port name =>
full.url=http://test:8080
- then development properties overrides the hostname only =>
full.url=http://localhost:8080
It also doesn't blow up that it can't find "override-I-Dont-Exist.properties" file but if we added it then it could override any property.
It also blows up if we tried to find a property called ${iDontExist}
One PropertyPlaceholderConfigurer
can cope with strange property dependency cycles across it's own files, but if you have two, then they can't cope with references to properties in each other's files.