title: spring basic mvc sample application, annotation scan confusion
body: <p>Little confused, the basic spring mvc app has this:</p>
  
  <p>app-config.xml</p>
  
  <pre><code>&lt;context:component-scan base-package="org.springframework.samples.mvc.basic" /&gt;
  </code></pre>
  
  <p>and the mvc-config.xml has:</p>
  
  <pre><code>&lt;!-- Configures the @Controller programming model --&gt;
      &lt;mvc:annotation-driven /&gt;
  </code></pre>
  
  <ol>
  <li><p>Do you really need both?</p></li>
  <li><p>for component-scan, does this mean if I don't put the correct package path my @Controller and @Service markers will have no effect?
  <strong>If I need more than one package, do I just duplicate the entry?</strong></p></li>
  </ol>
  
  <p>I tried using just the mvc:annotation-driven but that didn't work, I had to put com.example.web.controllers in the component-scan xml node to make it work.</p>