title: @Autowired annotation not working
body: <p>I'm trying to test the Autowire option like this:</p>
  
  <pre><code>@ContextConfiguration(locations = { "classpath:applnContext.xml" })
  public class Foo {
      @Autowired
      private Bar bar;
  
      public Bar getBar() {
          return bar;
      }
  
      public void setBar(final Bar bar) {
          this.bar = bar;
      }
  
      public static void main(final String[] args) {
          final Foo f = new Foo();
          System.out.println(f.getBar());
      }
  }
  </code></pre>
  
  <p>and the config file :</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:context="http://www.springframework.org/schema/context"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
          http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd"&gt;
  
      &lt;bean id="bar" class="entity.Bar"&gt;&lt;/bean&gt;
      &lt;context:annotation-config /&gt;
  
  &lt;/beans&gt;
  </code></pre>
  
  <p>But the <code>Bar</code> object is not getting injected. Am I missing anything here or doing something wrong?</p>
  
  <p>Note that I'm specifying the applicationContext file using annotation on the class.</p>