title: difference between @Component and @Configuration in Spring 3
body: <p>I came across two annotations provided by Spring 3 (<a href="http://docs.spring.io/spring/docs/current/javadoc-api/org/springframework/stereotype/Component.html" rel="nofollow noreferrer">@Component</a> and <a href="http://docs.spring.io/spring-framework/docs/current/javadoc-api/org/springframework/context/annotation/Configuration.html" rel="nofollow noreferrer">@Configuration</a>)
  I am a bit confused between these.<br />
  Here is what I read about <code>@Component</code></p>
  <blockquote>
  <p>Put this “context:component” in the bean configuration file, it means,
  enable the auto-scanning feature in Spring. The base-package is indicate
  where are your components stored, Spring will scan this folder and
  find out the bean (annotated with @Component) and register it in
  Spring container.</p>
  </blockquote>
  <p>So I am wondering what is the use of <code>@Configuration</code> then if <code>@Controller</code> will register my beans without the need to declare them in the spring configuration XML file.</p>