Reputation: 47300
@RequestMapping(value = "/Foo/{id}/{friendlyUrl:*}", method = RequestMethod.GET)
public ModelAndView getFoo(@PathVariable final Long id, @PathVariable final String friendlyUrl, final Principal principal) {
/* then match friendlyUrl,
* if it doesn't match use redirect
* view to send to correct place*/
}
Where I use the asterix my ide is coming back with an error ?
Upvotes: 1
Views: 977
Reputation: 23565
If you meant to use regex for matching then I guess what you want is
"/Foo/{id}/{friendlyUrl:.*}"
As per the doc the pattern must be {varName:regex}
.
Upvotes: 1