title: Loading spring application context files that are inside a jar in classpath
body: <p>I am trying to use ClassPathXmlApplicationContext in my java standalone code to load applicationContext.xml that is inside a jar file which is in my class path.</p>
  
  <pre><code>ApplicationContext context = new ClassPathXmlApplicationContext("classpath*:**/applicationContext*.xml");
  </code></pre>
  
  <p>applicationContext.xml entry as follows,</p>
  
  <pre><code> &lt;bean id="myAdder" class="com.foo.bar.MyAdder"&gt;
          &lt;property name="floatAdder" ref="floatAdder"/&gt;        
      &lt;/bean&gt;
  </code></pre>
  
  <p>And, when I try to load a bean that way I am getting NoSuchBeanException. Can't a bean by loaded in this way?</p>
  
  <p>The jar file is added to my classpath as a maven dependency. When I see the Java Build Path in Eclipse for this project, I see this jar linked as M2_REPO/.../..</p>
  
  <p>I was assuming I can load the bean inside the jar file as the jar is in classpath this way. Am I missing something?</p>
  
  <p>Thanks,Abi</p>