public void tablePage(HttpServletRequest request,HttpServletResponse response,Test test,Test test2) throws Exception {
Map map = new HashMap();
Util.writeUtf8Text(response, JsonUtil.objectjson(map));
System.out.println("_______________________-ds");
}
我这样写报java.lang.IllegalArgumentException: wrong number of arguments 错误
但我去掉一个参数就可以了为什么呢
如:public void tablePage(HttpServletRequest request,HttpServletResponse response,Test test) throws Exception {}这样就可以
求救。。
难道spring控制层不能写2个参数;我记得以前注解的那种方法是可以的。
Map map = new HashMap();
Util.writeUtf8Text(response, JsonUtil.objectjson(map));
System.out.println("_______________________-ds");
}
我这样写报java.lang.IllegalArgumentException: wrong number of arguments 错误
但我去掉一个参数就可以了为什么呢
如:public void tablePage(HttpServletRequest request,HttpServletResponse response,Test test) throws Exception {}这样就可以
求救。。
难道spring控制层不能写2个参数;我记得以前注解的那种方法是可以的。
你为什么要写两个一样的对象来接收前台的值有什么意义吗?
你为什么要写两个一样的对象来接收前台的值 啊有什么特殊的意义么?
你用注解的时候处理多参数,应该用的都是简单类型吧?比如String这样的。Spring可以根据形参名称去跟参数名称对应来做匹配。但你现在想直接用值对象Test,注解只怕也无能为力啊。