MvcUriComponentsBuilder does not expand path variables in controller-level @RequestMapping [SPR-11391] #16018
Assuming this is running in a servlet mapped at "/", then requesting: http://localhost/user/123/contacts/create is expected to output:
But the actual output is:
If we change the code to the following:
Then the expected result is displayed.
Affects: 4.0 GA, 4.0.1
The text was updated successfully, but these errors were encountered:
Rossen Stoyanchev commented
This has been fixed in master.
Actually it doesn't since you have to provide a userId method argument (even if null) and then expand it. That duplication should not be necessary. In this example the supplied method argument values should be sufficient to fill in the URI variable values. If the method did not actually have a method argument for a URI variable, then you would need to call