Details
-
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:true
Description
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}.
http://blog.springsource.com/2009/03/08/rest-in-spring-3-mvc/
Attachments
Issue Links
- is related to
-
SPR-5779 Allow links to @Controller methods from views without hardcoding URLs
-
- Closed
-
- relates to
-
SPR-9935 Allow customization of request mappings
-
- Resolved
-
- supersedes
-
SPR-7654 Overloaded @PathVariable based handler methods fail with ambiguity when URL mapping is specified in XML
-
- Resolved
-