title: Is it possible to dynamically set RequestMappings in Spring MVC?
body: <p>I've been using Spring MVC for three months now. I was considering a good way to dynamically add RequestMapping. This comes from the necessity to put controller parts in a library and then add them dinamically. Anyway, the only way I can think of is to declare a controller like this:</p>
  
  <pre><code>@Controller
  @RequestMapping("/mypage")
  public class MyController {
  
  @RequestMapping(method = RequestMethod.GET)
      public ModelAndView mainHandler(HttpServletRequest req) {
          return handleTheRest(req);
      }
  
  }
  </code></pre>
  
  <p>Which is no good because basically I'm not using Spring. Then I cannot use form binding, annotations etc.. I'd like to add requestMappings dynamically to methods of classes that could be annotated like usual MVC controllers, with autobinding, so that I could avoid processing HttpServletRequest manually. </p>
  
  <p>Any ideas?
  }</p>