方法声明
@At("/testParam")
public void testParam(@Param("..") TestParam param)
TestParam 实体
package net.povodo.iptvweb.modules.controllers;
import java.util.Date;
import java.util.HashMap;
/**
* Created by Administrator on 2017/3/11.
*/
public class TestParam {
private HashMap<String,String> map;
private TestParam param;
private String str;
private Date date;
public HashMap<String, String> getMap() {
return map;
}
public void setMap(HashMap<String, String> map) {
this.map = map;
}
public TestParam getParam() {
return param;
}
public void setParam(TestParam param) {
this.param = param;
}
public String getStr() {
return str;
}
public void setStr(String str) {
this.str = str;
}
public Date getDate() {
return date;
}
public void setDate(Date date) {
this.date = date;
}
@Override
public String toString() {
return "TestParam{" +
"map=" + map +
", param=" + param +
", str='" + str + ''' +
", date=" + date +
'}';
}
}
我希望给map和param传参数能不能做到?我在表单数据中传了:
map.key1=value1
param.str=str
并没有接收到,我传递的 str=str 和 date='2017-1-1' 可以接收