最佳答案
@ComponentScan creates beans using both @Configuration and @Component. Both these annotations work fine when swapped. What is the difference then?