title: Add prefix to URLs of all the controller classes in the package
body: <p>I am developing a RESTful service using Spring 3.0 running on Tomcat Apache 6.0 environment. The Spring DispatcherServlet is configured at "/spring/*". The Spring servlet handles multiple clients and has many Controllers in the application. I am adding a new Controller for the REST service. I want all of my controller classes to have a identification prefix like "ws" (web-service) so that the complete URL to a resource looks like this:<br>
      <code>http://&lt;server&gt;:&lt;port&gt;/&lt;context&gt;/spring/ws/service1</code>  </p>
  
  <p>The only way I found with Spring annotation is to use @RequestMapping like this:</p>
  
  <pre><code>@Controller
  @RequestMapping("/ws/service1")
  public class Service1 {
  
  @RequestMapping(method=RequestMethod.GET)
  @ResponseBody
  public String getHtml() { ... }  
  
  ....
  }
  </code></pre>
  
  <p>But since I have dozens of classes, I don't want to put "/ws" prefix in each class. So that if another developer adds a new service, he does not have to remember to put this prefix and also if we decide to change the prefix name from "/ws" to something else, I don't have to change all the files. I found that @RequestMapping annotation is only applicable to Methods or Classes and not at the package level.</p>
  
  <p>Is there any way I can configure that all my REST Controllers are accessed with the prefix?</p>
  
  <p>Please note that I can not change the web.xml URL mapping of Spring servlet since, there are other Controllers which are running with that URL.</p>