@GetMapping("/insert")
public StuStdent insert() {
StuStdent stustudent =new StuStdent();
stustudent.setStuName("aaa");
StuStdent nstustudent =stuStdentDao.saveAndFlush(stustudent);
return nstustudent;
}
@GetMapping("/delete")
public String delete(){
StuStdent stustudent =new StuStdent();
stuStdentDao.delete(stustudent);
return "OK";
}
@GetMapping("/update")
public StuStdent update(int id){
StuStdent stustudent =stuStdentDao.findById(id).get();
stustudent.setStuSex("0");
stuStdentDao.save(stustudent);
return stustudent;
}
@GetMapping("/select")
public List select(){
List stustudent =new ArrayList<>();
stustudent =stuStdentDao.findAll();
return stustudent;
}