@RequestMapping(value="/toplayindex",method={RequestMethod.POST,RequestMethod.GET})
public ModelAndView toKpointPlay(HttpServletRequest request,@PathVariable("Id") int Id){
//代码块
}
从网上查的资料:
@PathVariable 从路径里面去获取变量
@RequestParam 是从请求里面获取参数。
例如上面的方法 请求地址应为 /toplayindex/${id},如果没有在地址上加上id,会请求不到该方法。