@RequestMapping(value = "/get/{id}/{userId}", method = RequestMethod.GET) public Result getMemberShip(@PathVariable("id") int id,@PathVariable("userId") int userId) {
假如id为非必需参数
//可以指定多个匹配路径 @RequestMapping(value = {"/get/{userId}", "/get/{id}/{userId}"}, method = RequestMethod.GET) //然后设置参数非必须 @PathVariable(required = false) String id