<context:annotation-config> vs <context:component-scan>
<p>I was going through some of the Spring documentation and from there I got to know that <code>&lt;context:annotation-config&gt;</code> is subset of <code>&lt;context:component-scan&gt;</code>, which means that what we can achieve with the help of the <code>&lt;context:annotation-config&gt;</code> , we can achieve the same using the <code>&lt;context:component-scan&gt;</code> with some add on functionality (i.e, scanning the specified basePackage for any defined component). <br>So my question is what are the uses of these two?</p>