public class IndexController extends Controller { public void index() { Datas da = getBean(Datas.class, "",false); System.out.println(da.getName()); System.out.println("--------------" + JSON.toJSONString(da)); renderText("Hello Maven JFinal wa 123"); } }
public class Datas { private int userid; private String Name; public int getUserid() { return userid; } public void setUserid(int userid) { this.userid = userid; } public String getName() { return Name; } public void setName(String name) { Name = name; } }
页面访问:127.0.0.1/web/index?Name=1231231&userid=4654
getBean中的实体收不到Name的值,但是Parameter能收到,这个实体映射问题有限制?
null --------------{"userid":4654} JFinal action report -------- 2018-03-15 18:29:25 ------------------------------ Url : GET /index Controller : com.ynwl.clientdata.web.front.IndexController.(IndexController.java:1) Method : index UrlPara : index Parameter : userid=4654 Name=1231231 --------------------------------------------------------------------------------
这个大小写问题,有什么办法解决?
项目:JFinal
请求改成:127.0.0.1/web/index?name=1231231&userid=4654