forum

Home / DeveloperSection / Forums / Difference between <context:annotation-config> vs <context:component-scan>

Difference between <context:annotation-config> vs <context:component-scan>

Anonymous User223921-Jul-2015
I'm learning Spring 3 and I don't seem to grasp the functionality behind <context:annotation-config> and <context:component-scan>.

From what I've read they seem to handle different annotations (@Required, @Autowired etc vs @Component, @Repository, @Service etc) but also from what I've read they register the same bean post processor classes.

To confuse me even more, there is an annotation-config attribute on <context:component-scan>.

Can someone shed some light on these tags? What's similar, what's different, is one superseded by the other, they complete each other, do I need one of them, both?

Updated on 22-Jul-2015
I am a content writter !

Can you answer this question?


Answer

2 Answers

Liked By