examOnline/src/com/action/QueryStudentByIDAction.java
(完整代码) 960Bpackage com.action;
import javax.servlet.http.HttpServletRequest;
import org.apache.struts2.ServletActionContext;
import com.entity.Student;
import com.opensymphony.xwork2.ActionSupport;
import com.service.StudentService;
import com.service.StudentServiceImpl;
/**
* 查找学生信息 -根据学生的id号
* @author junchuan.Wu
*
*/
public class QueryStudentByIDAction extends ActionSupport{
/**
*
*/
private static final long serialVersionUID = 1L;
private String studentID;
private StudentService studentService = new StudentServiceImpl();
public String getStudentID() {
return studentID;
}
public void setStudentID(String studentID) {
this.studentID = studentID;
}
@SuppressWarnings("static-access")
public String execute(){
HttpServletRequest request = ServletActionContext.getRequest();
Student student = studentService.getStudentInfo(studentID);
request.setAttribute("students", student);
return this.SUCCESS;
}
}
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。