SpringMVC 注释@PathVariable
@PathVariable 是用来获得请求url中的动态参数的:
1 @ResponseBody 2 @RequestMapping(value="/pointUpload/{userid}",method = RequestMethod.POST) 3 public Map<String,Object> pointUpload(HttpServletRequest request,HttpServletResponse response, 4 @PathVariable(value="userid") Integer userid){ 5 Map<String,Object> resultMap = new HashMap<String,Object>(); 6 try{ 7 8 }catch (Exception e){ 9 e.printStackTrace(); 10 } 11 return resultMap; 12 }