title: Spring support for @Controller given by <context:component-scan /> vs <mvc:annotation-driven>
body: <p>I've been researching what additional capabilities we have when using the mvc:annotation-driven tag and I'm having a difficult time digesting the results, especially in regards to the @Controller annotation.  I know this is very similar to <a href="https://stackoverflow.com/questions/3977973/whats-the-difference-between-mvcannotation-driven-and-contextannotation">this question</a> but please hear me out.</p>
  
  <p>According to the <a href="http://docs.spring.io/spring/docs/3.0.0.M3/reference/html/ch16s11.html" rel="nofollow noreferrer">Spring docs</a></p>
  
  <blockquote>
    <p>The basic purpose of the @Controller annotation is to act as a stereotype for the annotated class, indicating its role. The dispatcher will scan such annotated classes for mapped methods, detecting @RequestMapping annotations (see the next section).</p>
  </blockquote>
  
  <p>The documentation then goes on to show that the context:component-scan tag provides this support.  So that's all well and good, but then I was looking at what mvc:annotation-driven gives us, and the aforementioned stackoverflow <a href="https://stackoverflow.com/questions/3977973/whats-the-difference-between-mvcannotation-driven-and-contextannotation">question</a> provides the following answer</p>
  
  <blockquote>
    <p>mvc:annotation-driven declares explicit support for annotation-driven MVC controllers (i.e. @RequestMapping, @Controller, although support for those is the default behaviour), as well as adding support for declrative validation via @Valid and message body marshalling with @RequestBody/ResponseBody. </p>
  </blockquote>
  
  <p>This seems kind of redundant to me.  Maybe I don't get what this explicit support is.  Again, referring back to the official Spring <a href="http://docs.spring.io/spring/docs/3.1.0.M1/spring-framework-reference/html/mvc.html#mvc-annotation-driven" rel="nofollow noreferrer">documentation</a> we get the following</p>
  
  <blockquote>
    <p>[mvc:annotation-driven] registers the DefaultAnnotationHandlerMapping and AnnotationMethodHandlerAdapter beans that are required for Spring MVC to dispatch requests to @Controllers. </p>
  </blockquote>
  
  <p>That sounds pretty similar to the last example I provided from the docs. If anyone can provide some examples as to what we can do with the @Controller annotation using only the context:component-scan tag, what some of the limitations are, then the additional functionality of what we get when adding the mvc:annotation-driven tag, I think that would be very helpful.  Thanks in advance for any support on this.</p>