Home > Back-end >  SSM delete function
SSM delete function

Time:09-25

The following writing at 404:
@ RequestMapping ("/odelete ")
Public String newDelete (Model Model, an Integer id) {
//stu. SetId (stu. GetId ());
String sc=showAll. DeleteStu (id);
Model. The addAttribute (" sc ", sc);
Return "deleteJSP";
}


It can run normally, this is why:
@ RequestMapping ("/odelete ")
Public String newDelete (Model Model, Student stu) {
Stu. SetId (stu. GetId ());
String sc=showAll. DeleteStu (stu. GetId ());
Model. The addAttribute (" sc ", sc);
Return "deleteJSP";
}

CodePudding user response:

Stu. SetId (stu. GetId ()); What's the use of this sentence?

CodePudding user response:

Stu here. SetId (stu. GetId ()); Is pointless.
The code of the problem is not out of here..
Where is 404? Access controller 404 or return to the page 404?
You can stick your specific error 404.

CodePudding user response:

404 is can't find the path, and see if the path to write wrong,
  • Related