title: @autowired @qualifier pointing to a service in a jar file application
body: <p>I am using another application's service,since everything is already made and done.</p>
  
  <p>My application is to use the interface class inside the application jar.
  but something seem to be wrong when this code is called.</p>
  
  <pre><code>BeanFactory factory = new ClassPathXmlApplicationContext( "/Context-Controller.xml");
  </code></pre>
  
  <p>even if my <code>Context-Controller.xml</code> has this code</p>
  
  <pre><code>&lt;context:component-scan base-package="com.package" /&gt;
  </code></pre>
  
  <p>My error.</p>
  
  <blockquote>
    <p>Caused by:
    org.springframework.beans.factory.NoSuchBeanDefinitionException:
    No unique bean of type
    [com.package.ServiceIamUsing] is
    defined: Unsatisfied dependency of
    type [interface
    com.package.ServiceIamUsing]: expected
    at least 1 matching bean</p>
  </blockquote>
  
  <p>this is how i autowired it on my applciation.</p>
  
  <pre><code>    public class MyAppDao implements IMyAppDao {
  
   @Autowired
   @Qualifier("serviceIamUsing")
   private ServiceIamUsing serviceIamUsing;
      //More codes here
  
          }
  </code></pre>