title: How to scan multiple paths using the @ComponentScan annotation?
body: <p>I'm using Spring 3.1 and bootstrapping an application using the <code>@Configuration</code> and <code>@ComponentScan</code> attributes.</p>
  
  <p>The actual start is done with</p>
  
  <pre><code>new AnnotationConfigApplicationContext(MyRootConfigurationClass.class);
  </code></pre>
  
  <p>This Configuration class is annotated with</p>
  
  <pre><code>@Configuration
  @ComponentScan("com.my.package")
  public class MyRootConfigurationClass
  </code></pre>
  
  <p>and this works fine. However I'd like to be more specific about the packages I scan so I tried.</p>
  
  <pre><code>@Configuration
  @ComponentScan("com.my.package.first,com.my.package.second")
  public class MyRootConfigurationClass
  </code></pre>
  
  <p>However this fails with errors telling me it can't find components specified using the <code>@Component</code> annotation.</p>
  
  <p>What is the correct way to do what I'm after?</p>
  
  <p>Thanks</p>