title: What hierarchy should I setup in Spring configuration files?
body: <p>I am currently refactoring our Spring configuration files in our webapps. Now, I have grouped them by topic:</p>
  
  <pre><code>/WEB-INF/spring
    ./mvc/servlet-context.xml
    ./cache.xml
    ./root-context.xml
    ./security.xml
  </code></pre>
  
  <p><code>./*.xml</code> are loaded by <code>ContextLoaderListener</code> which is the Spring root context and all stuff in <code>./mvc/*.xml</code> are loaded by the subcontext of the DispatcherServlet.</p>
  
  <p>I know if I do load the <code>security.xml</code> by the dispatcher context all beans won't be visible to the parent context.</p>
  
  <p>Now, should a loader hierarchy look like? What should be loaded by root and what by the sub context?</p>