Difference between Spring annotations
问题 Questions: 1) Difference between @Component and @Configuration ? I have read that both remove the necessity of wiring code to be put in XML, but did not get the difference between these. 2) What are the differences between @Autowired , @Inject and @Resource ? - Which one to use when? - What are the pros/cons of each? 回答1: @Component and @Configuration are indeed very different types of annotations. @Component and similar annotations ( @Service , @Repository , etc. )and its JSR-330 counterpart