title: Spring MVC - AlwaysUseFullPath configuration for annotation based mappings
body: <p>I am developing a Spring MVC application.</p>
  
  <p>I am moving away from XML configuration of the Controllers to annotation based config using <code>@Controller</code> and <code>@RequestMapping</code> to define the URL mapping to controllers.</p>
  
  <p>Previously I defined the mappings in config as follows:</p>
  
  <pre><code>   &lt;bean id="handlerMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping"&gt;        
          &lt;property name="alwaysUseFullPath" value="true" /&gt;
          &lt;property name="mappings"&gt;
              &lt;props&gt;
                  &lt;prop key="/status/**"&gt;statusController&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  
  <p>You will see that I have defined the property <code>alwaysUseFullPath</code> as true for my url mappings. I want to set this property for the annotation mappings (<code>@RequestMapping</code>) and I have two questions:</p>
  
  <p>1) Is it possible to do this on a class by class basis? e.g. if i want some of my controllers to have this property but some other controllers not to, is that possible?</p>
  
  <p>2) I have seen that it can be set by configuring in XML the <code>DefaultAnnotationHandlerMapping</code> and setting hte property in there (looks like this will apply the property to all annotations) - but I have found <a href="http://forum.springsource.org/showthread.php?81238-Conflict-between-lt-mvc-annotation-driven-gt-and-DefaultAnnotationHandlerMapping" rel="noreferrer">this issue</a> - is this resolved now? or is the only way to get around this to not use the <code>&lt;mvc:annotation-driven&gt;</code> line?</p>
  
  <p>Thanks</p>