- 
                Notifications
    You must be signed in to change notification settings 
- Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement
Description
Laplie Anderson opened SPR-14032 and commented
Currently, the way to get the wildcard part of a request mapping is a bit cumbersome:
@RequestMapping("/somePrefix/{element}/**")
public void myAction(@PathVariable String element, HttpServletRequest request) {
	    String path = (String) request.getAttribute(HandlerMapping.PATH_WITHIN_HANDLER_MAPPING_ATTRIBUTE);
	   // do some path manipulation here
	   // do actual work
}It would be nicer if we could just have the element assigned directly:
@RequestMapping("/somePrefix/{element}/{**}")
public void myAction(@PathVariable String element, @PathVariable String wildcard) {
	  // do actual work
}Issue Links:
- Wildcard mapping for path segments at the end of a @RequestMapping [SPR-14193] #18766 Wildcard mapping for path segments at the end of a @RequestMapping
2is10 and area1211
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently applyA suggestion or change that we don't feel we should currently applytype: enhancementA general enhancementA general enhancement