title: @ComponentScan doesn't work in Spring boot AutoConfiguration class?
body: <p>I am trying to create a new starter. I have a business module, say ProjectManager, that contains some classes annotated with @Component. Following the tutorial, I created an autoconfigure module, it contains an AutoConfiguration class. Firstly, I tried to use @ComponentSan to find the beans in my business module. </p>
  
  <pre><code>@ComponentScan(value = {"com.foo.project"})
  @ConditionalOnClass({Project.class})
  @Configuration
  public class ProjectAutoConfiguration {
      ....
  
  }
  </code></pre>
  
  <p>But it doesn't work. I have to add additional configuration class as below:</p>
  
  <pre><code>@Configuration
  @ComponentScan(value = {"com.foo.project"})
  @MapperScan(value = {"com.foo.project"})
  public class ProjectConfig {
  }
  </code></pre>
  
  <p>And then import it into AutoConfiguration class like below:</p>
  
  <pre><code>@Import(ProjectConfig.class)
  @ConditionalOnClass({Project.class})
  @Configuration
  public class ProjectAutoConfiguration {
      ....
  
  }
  </code></pre>
  
  <p>That works. But according to the spring <a href="http://docs.spring.io/spring-boot/docs/current/reference/html/boot-features-developing-auto-configuration.html" rel="noreferrer">doc</a>.</p>
  
  <blockquote>
    <p>auto-configuration is implemented with standard @Configuration classes</p>
  </blockquote>
  
  <p>So my question is, Why @ComponentScan doesn't work here ? Did I make something wrong? Or it is by design ?</p>