@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*/
}
在我使用星号的地方,我的 ide 返回错误?
最佳答案
关于java - spring mvc 匹配 url 并用作变量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14083061/