title: What's the difference between how @Component and @Repository / @Service annotations are processed?
body: <p>I've stumbled upon a rather strange issue today with Spring 3.0:</p>
  
  <p>There's an abstract class <code>A</code> and its concrete implementation <code>A_Impl</code>. <code>A_Impl</code> is annotated as <code>@Repository</code> and is auto-scanned by Spring (<code>&lt;context:component-scan&gt;</code> and <code>&lt;context:annotation-config/&gt;</code> are both declared in context). <code>A</code> and <code>A_Impl</code> are deployed in separate JARs (not sure if that matters). Everything works just fine.</p>
  
  <p>Now, I was reviewing that code and <code>@Repository</code> didn't seem like a good fit semantically (the class in question has nothing to do with persistence) so - in my infinite wisdom - I've decided to change that to more generic <code>@Component</code>. Needless to say, everything blew up leaving me looking like a complete idiot. The error (which occurred during Spring context initialization) was Spring's <code>ClassPathResource.getInputStream()</code> method complaining about <code>A</code> class not being there (it is, I've manually checked; plus regular class loader finds it just fine)</p>
  
  <p><strong>Nothing else has changed</strong>. If I swap <code>@Component</code> for <code>@Repository</code> context initializes, if I swap them back it doesn't with the above error. <a href="http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html#beans-stereotype-annotations" rel="noreferrer">Spring documentation claims there's no difference</a> between <code>@Component</code> and <code>@Repository</code> which is clearly a damned lie :-) So I wonder - what <strong>is</strong> the difference?</p>