title: Filter specific packages in @ComponentScan
body: <p>I want to switch from XML based to Java based configuration in Spring. Now we have something like this in our application context:</p>
  
  <pre><code>&lt;context:component-scan base-package="foo.bar"&gt;
      &lt;context:exclude-filter type="annotation" expression="o.s.s.Service"/&gt;
  &lt;/context:component-scan&gt;
  &lt;context:component-scan base-package="foo.baz" /&gt;
  </code></pre>
  
  <p>But if I write something like this...</p>
  
  <pre><code> @ComponentScan(
      basePackages = {"foo.bar", "foo.baz"},
      excludeFilters = @ComponentScan.Filter(
         value= Service.class, 
         type = FilterType.ANNOTATION
      )
   )
  </code></pre>
  
  <p>... it will exclude services from <strong>both</strong> packages. I have the strong feeling I'm overlooking something embarrassingly trivial, but I couldn't find a solution to limit the scope of the filter to <code>foo.bar</code>.</p>