title: Scoped configuration
body: <p>Im currently looking to consolidate a load of configuration files. Currently for every application we have we have a set of config files for each environment we deploy to.</p>
  
  <p>So for example we have a properties file for test, one for uat and one for prod. With lots of duplicated stuff.</p>
  
  <p>What im looking to do is replace these with a consolidated file, using scoping and wildcards.</p>
  
  <p>so, for example, I could have the following</p>
  
  <pre><code>*.value1=blah
  uat.value1=blahblah
  
  *.value2={value1}blah
  </code></pre>
  
  <p>So in prod:</p>
  
  <pre><code>value1=blah, value2=blahblah
  </code></pre>
  
  <p>In uat:</p>
  
  <pre><code>value1=blahblah, value2=blahblahblah
  </code></pre>
  
  <p>In test:</p>
  
  <pre><code>value1=blah, value2=blahblah
  </code></pre>
  
  <p>Now, I <em>could</em> roll this myself, although I'd look to leverage commons-config, but I was wondering if anyone knew of any projects out there that do this kind of thing?</p>