title: Resolve Spring injections for dependant jar in base Project
body: <p>I am working on a project where we developed various jars as small modules. Then these jars were added as dependencies in a base project. </p>
  
  <p>In the base projects applicationContext we have imported the applicationContext of all dependendant jars using the following line</p>
  
  <pre><code>&lt;import resource="classpath*:applicationContext.xml" /&gt;
  </code></pre>
  
  <p>The above line makes sure that all the applicationContexts.xml s get loaded. On code analysis I found that each of the module in its applicationContext has the dataSource injected. Although all the jars are going to use the same datasource still each of the jar is instantiating its own datasource. Is there a way by which I can specify a global datasource which can be injected through base class itself.</p>
  
  <p>In each of the jars we have a datasource injected which the jar uses to perform database operations. I would want the jars to use a datasource of base jar instead of its own datsources.</p>