title: Spring No unique bean of type
body: <p>i have a little trouble in Spring with two component of a service.</p>
  
  <p>I have this component:</p>
  
  <pre><code>@Component
  public class SmartCardWrapper 
  </code></pre>
  
  <p>and this one:</p>
  
  <pre><code>@Component
  public class DummySmartCardWrapper extends SmartCardWrapper
  </code></pre>
  
  <p>The service autowire both but spring fails due this expection:</p>
  
  <pre><code>org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [com.cinebot.smartcard.SmartCardWrapper] is defined: expected single matching bean but found 2: [dummySmartCardWrapper, smartCardWrapper]
  </code></pre>
  
  <p>Why it doesn't use class names?</p>