title: Jersey 2 + Spring: @Autowired is null
body: <p>I'm trying to use Jersey 2 with Spring with help of this article:
  <a href="https://stackoverflow.com/questions/14627409/how-to-use-jersey-2-with-spring-ioc-container">How to use Jersey 2 with Spring IoC container</a></p>
  
  <p>But autowired bean is null when the application tries to call it after the client request.
  In applicationContext.xml i have only <strong>component-scan</strong> setting.</p>
  
  <pre><code>In pom.xml: 
  &lt;spring.version&gt;4.1.0.RELEASE&lt;/spring.version&gt;
  &lt;jersey.version&gt;2.12&lt;/jersey.version&gt;
  
  @Component
  @RequestScoped
  @Path("/user")
  public class UserREST {
      @Autowired
      private UserFacade userFacade;
  
      @POST
      @Path("/auth")
      @Consumes(MediaType.APPLICATION_JSON)
      @Produces({MediaType.APPLICATION_JSON})
      public AuthResponse authorize(User user){
          return userFacade.authorize(user);  // Null is caught here
      }
  }
  </code></pre>
  
  <p>-</p>
  
  <pre><code>@Component
  public class UserFacade {
  
      public AuthResponse authorize(com.pushock.model.User user){
          AuthResponse response = new AuthResponse();
          response.setAuthorized(true);
          return response;
      }
  }
  </code></pre>
  
  <p>What am I doing wrong?</p>
  
  <p><strong>UPD:</strong>
  Here is my pom.xml <a href="https://bitbucket.org/spukhov/memo-ws/src/00724e00e3aa786f62fd0e43fe0606de6ae569df/pom.xml?at=master" rel="nofollow noreferrer">https://bitbucket.org/spukhov/memo-ws/src/00724e00e3aa786f62fd0e43fe0606de6ae569df/pom.xml?at=master</a></p>