关于实体类getset方法首字母小写问题

实体类:
private Date cDateTime;
private String cNickname;

public Date getcDateTime() {
return cDateTime;
}

public void setcDateTime(Date cDateTime) {
this.cDateTime = cDateTime;
}

public String getcNickname() {
return cNickname;
}

public void setcNickname(String cNickname) {
this.cNickname = cNickname;
}

在控制层(controller)手动设置:
HttpServletRequest request = ServletActionContext.getRequest();
String cNickname = request.getParameter("cNickname");
comment.setcNickname(cNickname);
comment.setcDateTime(new Date());
posted @ 2019-02-15 09:34  迷墙!  阅读(1115)  评论(0编辑  收藏  举报