关于实体类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());

转载于:https://www.cnblogs.com/guodonghan/p/10381777.html

你可能感兴趣的:(关于实体类getset方法首字母小写问题)