我已经与现在挣扎了几个星期,我有一个方法:@RequestParam春不工作
@RequestMapping(method = RequestMethod.GET)
public ModelAndView update(
HttpServletRequest request,
HttpServletResponse response,
@RequestParam(value = "id", required = true) String id) throws Exception
{
model = new ModelAndView("/jspadmin/game/update");
getLog().error("::: valor del string: " + request.getParameter("id"));
getLog().error("::: valor del string: de ruta" + id);
}
这个代码是内部的的MultiActionController,但我不能获得ID从@RequestParam anotation值
我已经anotation在aplicationContext.xml
即时不使用anotations所有,只是在该方法中,我不知道如果T驱动他控制器需要一个@Controller anotation强制性的使工作中的方法,我不知道什么即时通讯失踪,感谢提前家伙工作。
你有在控制器级设置了@ RequestMapping的'value'属性?是的,在控制器类上需要'@ Controller'。 –
我在xml中创建控制器,如果我把@controller放在类中,这很重要吗?因为我得到下一个错误: –