title: spring autowiring not working
body: <p>Hi,
  I am using spring 3.0 with Quartz in a scheduler class.  I have created the application context by </p>
  
  <pre><code>private static final ClassPathXmlApplicationContext applicationContext;
  static {
      applicationContext = new
          ClassPathXmlApplicationContext("config/applicationContext.xml");
  }
  </code></pre>
  
  <p>The problem is that none of the <code>@Autowired</code> beans actually get auto-wired, so I have to manually set dependencies like this: </p>
  
  <pre><code>&lt;bean class="com.spr.service.RegistrationServiceImpl" id="registrationService"&gt;
      &lt;property name="userService" ref="userService" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>Example of where I'm using <code>@Autowired</code>:  </p>
  
  <pre><code>public class RegistrationService {
     @AutoWired private UserService userService;
     // setter for userService;
  }
  
  public class UserService{
     // methods
  }
  </code></pre>
  
  <p>I also made sure to enable the annotation configuration in my Spring config:</p>
  
  <pre><code>&lt;context:annotation-config/&gt;
  &lt;bean id="registrationSevice" class="RegistrationService"/&gt;
  &lt;bean id="userService" class="UserService"/&gt;
  </code></pre>
  
  <p>Why is <code>@Autowired</code> not working for me?</p>