Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I think there is a simpler approach:</p> <p>In your host application (the webapp) define something like the following <code>contextConfigLocation</code> parameter:</p> <pre><code>&lt;context-param&gt; &lt;param-name&gt;contextConfigLocation&lt;/param-name&gt; &lt;param-value&gt;classpath*:/META-INF/foo/*-configuration.xml&lt;/param-value&gt; &lt;/context-param&gt; </code></pre> <p>The crucial parts are <code>classpath*:</code>as it results in scanning the entire classpath for config files matching the following pattern. If you only use <code>classpath:</code> the lookup will stop at the first file found. It also won't traverse JARs if not starred correctly.</p> <p>The second crucial part is having at least one non-wildcarded basepath for the lookup to work. This is due to <code>Classloader</code> traits that only reliably returns all resources if they contain a base path (see the <a href="http://static.springsource.org/spring/docs/3.0.x/javadoc-api/org/springframework/core/io/support/PathMatchingResourcePatternResolver.html" rel="nofollow noreferrer">Javadoc</a> on <code>PathMatchingResourcePatternResolver</code> for details).</p> <p>What you now have to do with your plugin projects is place your <code>plugin-configuration.xml</code> in <code>/META-INF/foo/</code>, package that as JAR and place it into your classpath (in case you build with Maven just add the dependency).</p> <p>On application start Spring will now also pickup all config files from your plugins and build the ÀpplicationContext` from em.</p> <p>You also might wanna checkout another post I did on application modularity with Spring: <a href="https://stackoverflow.com/questions/748377/how-do-you-make-a-multi-module-spring-configuration/780737#780737">How do you make a multi-module spring configuration?</a></p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload