是的你可以。如果要在其中访问它,只需在您的方法中将其声明为@PathVariable。
@Controller@RequestMapping(value = "{version}/test")class TestController { @RequestMapping(value="/something") public ModelAndView doSomething(@PathVariable String version) { // do something here with the version }}


