title: What is the difference between @Configuration and @Component in Spring?
body: <p><code>@ComponentScan</code> creates beans using both <code>@Configuration</code> and <code>@Component</code>. Both these annotations work fine when swapped. What is the difference then?</p>