title: How do <context:include-filter> and <context:exclude-filter> work in Spring?
body: <p>I have several services:</p>
  
  <ul>
  <li><em>example.MailService</em></li>
  <li><em>example.LDAPService</em></li>
  <li><em>example.SQLService</em></li>
  <li><em>example.WebService</em></li>
  <li><em>example.ExcelService</em></li>
  </ul>
  
  <p>annotated with <code>@Service</code> annotation. How can I exclude all services except one?</p>
  
  <p><br>
  For example I want to use only <em>MailService</em>. I use the following configuration:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;context:component-scan base-package="example"&gt;
      &lt;context:include-filter type="aspectj" expression="example..MailService*" /&gt;
      &lt;context:exclude-filter type="aspectj" expression="example..*Service*" /&gt;
  &lt;/context:component-scan&gt;
  </code></pre>
  
  <p>but now all services are excluded.</p>
  
  <p>Why all services are excluded if exists one rule to include <em>MailService</em>? </p>