What is the difference between @Component
and @Bean
s in @Configuration
classes? Which one should I use?
I tried both ways: in any way I can get singleton beans or bean factories (e.g. prototype scope). The app works correctly in any solution, so i guess this question is a matter of architecture.