是的你可以。如果要在其中访问它,只需在您的方法中将其声明为@PathVariable。
@Controller@RequestMapping(value = "{version}/test")class TestController { @RequestMapping(value="/something") public ModelAndView doSomething(@PathVariable String version) { // do something here with the version }}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)