Uploaded image for project: 'Spring Framework'
  1. Spring Framework
  2. SPR-5757

Externalized request mapping as a 1st class alternative to @RequestMapping


    • Type: New Feature
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 3.0.5
    • Fix Version/s: None
    • Component/s: Web
    • Labels:
    • Last commented by a User:


      While I am not averse to having the controllers use annotation based configuration, I would love to see a functionally equivalent XML based routing configuration, for those who would rather not use it. The current model, IMHO, has the following problems:

      1. URL mapping is scattered all over the place. If I have 15 controllers, with 10 methods each (and note that there's the issue of each method potentially having a completely different URL that it can match), a newbie would have to look at 150 potential places to map a given URL to the controller action it resolves to. Admittedly, having good conventions and oversight will alleviate this problem, but seems too easy to have things go awry.

      2. any changes to the mapping requires a recompile.

      3. The same controller method cannot be mapped to multiple urls (or at least I can't figure out how to do it ), allowing different views to be driven by the same controller.

      4. A somewhat minor thing. There is now way to write a controller w/o Spring dependencies.

      Btw, It would be nice to have mappings that are pattern based, such as, a way to map /somepath/

      {method} to handler SomePathController, method {method}




          Issue Links



              • Assignee:
                rstoya05-aop Rossen Stoyanchev
                vijayn Vijay Natarajan
                Last updater:
                Rossen Stoyanchev
              • Votes:
                12 Vote for this issue
                21 Start watching this issue


                • Created:
                  Days since last comment:
                  2 years, 11 weeks, 6 days ago