title: Strange situation with @Autowired
body: <p>I have strange situation with <code>@Autowired</code> 
  App's main class:</p>
  
  <pre><code>@Configuration
  @EnableAutoConfiguration
  @SpringBootApplication
  @ComponentScan({"khartn", "khartn.torrentsuploader.processor"})
  public class NewMain implements CommandLineRunner {
  
      public static void main(String[] args) {
  
          SpringApplicationBuilder builder = new SpringApplicationBuilder(NewMain.class);
          builder.headless(false);
          ConfigurableApplicationContext context = builder.run(args);
      }
  
      @Override
      public void run(String... args) throws Exception {
      }
  }
  </code></pre>
  
  <p>Component class:</p>
  
  <pre><code>@Component("MyDirectoryReader")
  public class MyDirectoryReader {
  
      public  MyDirectoryReader ( ) {
          System.out.println("qqqqqqqqqqqqqqq");
      }
  
      public void readDir() {
          try {
              String initialPathStr = NewJFrame.jTextField1.getText();
              System.out.println("initialPathStr " + initialPathStr);
  
              Path dir = FileSystems.getDefault().getPath(initialPathStr);
              DirectoryStream&lt;Path&gt; stream = Files.newDirectoryStream(dir, "*.{torrent}");
              for (Path path : stream) {
                  System.out.println(path.getFileName());
              }
              stream.close();
          } catch (Exception ex) {
              ex.printStackTrace();
          }
      }
  }
  </code></pre>
  
  <p>When application starting, I see, what MyDirectoryReader class is initialized:</p>
  
  <pre><code>2015-04-11 21:42:29.405  INFO 9375 --- [.NewMain.main()] s.c.a.AnnotationConfigApplicationContext : Refreshing org.springframework.context.annotation.AnnotationConfigApplicationContext@13d6044f: startup date [Sat Apr 11 21:42:29 SAMT 2015]; root of context hierarchy
  qqqqqqqqqqqqqqq
  </code></pre>
  
  <p>Config class:</p>
  
  <pre><code>@Configuration
  @ComponentScan({"khartn", "khartn.torrentsuploader.processor"})
  public class AppConfig {
  
      @Bean(initMethod = "init")
      public NewJFrame mainForm() {
          System.out.println("init mainForm");
          return new NewJFrame();
      }
  
  }
  </code></pre>
  
  <p>And in NewJFrame class have autowired field</p>
  
  <pre><code>public class NewJFrame extends javax.swing.JFrame {
  
      @Autowired 
      @Qualifier(value = "MyDirectoryReader")
      MyDirectoryReader myDirectoryReader;
  </code></pre>
  
  <p>But when NewJFrame showed and button pressed, </p>
  
  <pre><code> private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {                                         
  
          if (myDirectoryReader == null) {
              System.out.println("myDirectoryReader is null");
          }
  //        myDirectoryReader.readDir();
      }   
  </code></pre>
  
  <p>then myDirectoryReader is null.</p>
  
  <p>Why MyDirectoryReader is initialized as Component, but not autowired to the field?</p>