public void update(String remark,int status,int id){
Student student = (Student)dao.getHibernateTemplate().get(Student.class, id);
student.setComments(remark);
student.setStatus(status);
student.setId(id);
dao.getHibernateTemplate().update(student);
// Object[] value = {remark,status,id};
// dao.getHibernateTemplate().update("update Student SET comments=?,status=? where id=?",value);
}
只修改相关字段
https://blog.csdn.net/liuxiao723846/article/details/42937335