title: Switching to @Inject instead of @Resource Annotation is causing "Injection of autowired dependencies failed" errors during bean creation
body: <p>We recently encountered an issue where we had a bean being injected using the @Resource annotation. This was working fine but we have been moving over to the @Inject annotation as our preferred method of injecting beans.</p>
  
  <p>What we found however was that when we changed one of our beans to use @Inject instead of @Resource then a large number of our tests began to fail with the exception:</p>
  
  <pre><code>Error creating bean with name 'myBean': Injection of autowired dependencies failed
  </code></pre>
  
  <p>Sample code:</p>
  
  <pre><code>@Component
  public class MyClassImpl implements MyParentClass {
      @Resource
      private MyBean myBean;
  }
  </code></pre>
  
  <p>Could anyone advise on situations where @Inject would not work but @Resource would?</p>