title: What are possible lightweight Java configuration libraries for handling complex configuration?
body: <p>I have a need for processing a relatively complex set of configuration parameters for a java application. The requirements are roughly:</p>
  
  <ul>
  <li>Nested configuration values with lists, maps, etc. - not just plain key/value pairs</li>
  <li>Multiple configuration files where later configuration files can intelligently override settings from earlier configuration files.</li>
  <li>Multiple references to the same configured item from different places</li>
  <li>Inheritable configured objects, so anew object can copy configuration from a previous object can just change specific things</li>
  <li>Very little code needed for a new configuration options - the optimal would be to just add an @Configurable annotation to a field, or something similar</li>
  </ul>
  
  <p>Now, I know that Spring fulfills all of these in a certain way. However, it has some disadvantages, though none fatal:</p>
  
  <ul>
  <li>Spring is not really optimized as a configuration language, as it is somewhat more concerned about dependency injection</li>
  <li>The XML configuration files are more meant to be shipped inside a JAR file and not modified by the end user, with all the configurable properties referenced via a separate properties file or similar - where as I need the configuration file to be complete and easily end-user modifiable</li>
  <li>Spring configuration is somewhat tedious when there are online configuration refreshes without terminating ongoing connections and when there needs to be separate configuration checking primitives that need to validate a configuration fully, but not actually do anything</li>
  </ul>
  
  <p>So, I am asking, can you think of any alternatives that would fulfill my requirements?</p>
  
  <p>I sort of like YamlBeans, but it is lacking a few features.</p>