-
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)type: bugA general bugA general bug
Milestone
Description
Eberhard Wolff opened SPR-5537 and commented
I have a controller like
@RequestMapping(value = "/customer/{id}", method = { RequestMethod.GET })
public ModelAndView getById(@PathVariable("id") int id) {
}
I do a GET to http://localhost:8080/customer/42.xml to get an XML representation. Result:
org.springframework.web.util.NestedServletException: Request
processing failed; nested exception is
org.springframework.beans.TypeMismatchException:
Failed to convert value of type [java.lang.String] to required type
[int];
nested exception is java.lang.NumberFormatException: For input string:
"42.xml"
i.e. the extension is considered part of the id and therefore it fails.
Affects: 3.0 M2
Issue Links:
- RESTful URLs with path variables containing dots are incorrectly mapped [SPR-6231] #10899 RESTful URLs with path variables containing dots are incorrectly mapped
- a Uri Value is incorrectly extracted if it contains '.'. [SPR-6164] #10832 a Uri Value is incorrectly extracted if it contains '.'.
- Extend Multiple @PathVariable Selection to allow delimeters other than / [SPR-5630] #10301 Extend Multiple
@PathVariableSelection to allow delimeters other than /
Referenced from: commits c178888
1 votes, 1 watchers
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: bugA general bugA general bug