title: override spring bean in a jar file
body: <p>I have a dao jar file that contains all the domain objects and service classes. it has a config file <code>dao-resource.xml</code> with <code>id=datasource</code>. </p>
  
  <p>I am using this jar file in another project which has its own <code>app-context.xml</code>, but i want to override the bean with <code>id="datasource"</code> in the jar file</p>
  
  <p>how do i do this. I tried to add a bean with same id in <code>app-context.xml</code> and added both files to classpathxmlapplicat.... first <code>dao-resource.xml</code> then <code>app-context.xml</code></p>
  
  <p>but that did not seem to work.</p>
  
  <p>how else can i override a bean</p>