title: Doing context:component-scan programatic way?
body: <p>I'm mixed using <code>AnnotationConfigApplicationContext</code> and <code>ClasspathXmlApplicationContext</code> currently, and make <code>AnnotationConfigApplicationContext</code> as the parent context. But I found that beans defined in <code>AnnotationConfigApplicationContext</code> doesn't cope well with beans defined in <code>ClasspathXmlApplicationContext</code>. So I'd like to drop <code>ClasspathXmlApplicationContext</code> anyway, and make my application use <code>AnnotationConfigApplicationContext</code> only.</p>
  
  <p>The problem is, I don't know how to replace <code>&lt;context:component-scan&gt;</code> totally. I can easily do a package scan using <code>AnnotationConfigApplicationContext.scan(...)</code>, but there seems no way to add include/exclude pattern in <code>AnnotationConfigApplicationContext</code>.</p>
  
  <p>Any idea?</p>