title: Spring (autowired) component use multiple in the same class
body: <p>I have been started use Spring recently. And I didn't find the solution to my problem. </p>
  
  <p>I have a component:</p>
  
  <pre><code>@Component
  @Scope(value = "prototype", proxyMode = ScopedProxyMode.TARGET_CLASS)
  @Log4j2
  public class CompX { ....
  </code></pre>
  
  <p>I would like to use it twice in a (component) class:</p>
  
  <pre><code>...
  @Autowired
  private CompX current;
  
  @Autowired
  private CompX old;
  ...
  </code></pre>
  
  <p>How can I do this?
  Always got following exception.</p>
  
  <blockquote>
    <p>"org.springframework.beans.factory.NoUniqueBeanDefinitionException: No qualifying bean of type..."</p>
  </blockquote>