title: @Qualifier annotation not working
body: <p>I am trying DI with autowiring and I came across @Qualifier annotation annd tried the following code:</p>
  
  <p>Car.java</p>
  
  <pre><code>package beans;
  
  import org.springframework.beans.factory.annotation.Autowired;
  //import org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor;
  import org.springframework.beans.factory.annotation.Qualifier;
  
  public class Car {  
  
  @Autowired
  @Qualifier("e1")
  
  private Engine engine;
  // no need to have setter or constructor
  
  public void showData(){
      System.out.println("Engine Model Year : "+engine.getModelyear());
  }
  
  }
  </code></pre>
  
  <p>Engine.java</p>
  
  <pre><code>package beans;
  
  public class Engine {
  private String modelyear;
  
  public void setModelyear(String modelyear) {
      this.modelyear = modelyear;
  }
  
  public String getModelyear() {
      return modelyear;
  }
  
  }
  </code></pre>
  
  <p>Spring.xml</p>
  
  <pre><code>&lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN"
              "http://www.springframework.org/dtd/spring-beans-2.0.dtd"&gt;
  
  &lt;beans&gt;
  &lt;!-- activate autowire annotation --&gt;
  &lt;bean class="org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor"/&gt;
  
  &lt;bean id="e1" class="beans.Engine"&gt;
   &lt;property name="modelyear" value="2017"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="e2" class="beans.Engine"&gt;
   &lt;property name="modelyear" value="2018"/&gt;
  &lt;/bean&gt;
  
  &lt;bean id="c" class="beans.Car"&gt;
  
  &lt;/bean&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>Main.java</p>
  
  <pre><code>package MainClass;
  
  import org.springframework.context.ApplicationContext;
  import org.springframework.context.support.ClassPathXmlApplicationContext;
  
  import beans.Car;
  
  public class AutoAnno_Main {
      public static void main(String[] args) {
          ApplicationContext ap=new ClassPathXmlApplicationContext("resources/spring.xml");
           Car c=(Car)ap.getBean("c");
              c.showData();
      }
  }
  </code></pre>
  
  <p>And the error I am getting is:</p>
  
  <pre><code>Caused by: org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type 'beans.Engine' available: expected single matching bean but found 2: e1,e2
  </code></pre>
  
  <p>what's wrong in this I think the syntax is correct is there any problem with version
  I am using <strong>eclipse Oxygen</strong>           </p>