function insert(){
$.ajax({
type:"POST",
url:"../test/yn/insert",
dataType: "json",
'contentType':"application/json",
//data:JSON.stringify({"stuNum":"2","name":"stu2","classNum":"2"}),
data:JSON.stringify({"stuNum":$("#stuNum").val() , "name":$("#name").val(), "classNum":$("#classNum").val()}),
success: function(student){
defaultPage();
}
})
}
@RequestMapping("insert")
@ResponseBody
public Student methodsInsert(@RequestBody Student student){
stuService.insertStudent(student);
return student;
}