New contact with a project, using a large number of annotations;
Note that the page's jump was not found when viewed through the request path, and then all the methods and annotations in the file were checked before finding the corresponding path.
1@ModelAttribute ("Totalfinal")2 Publictotalfinal get (String ID) {3 if(Stringutils.isnotblank (id)) {4Totalfinal totalfinal =Totalfinalservice.get (Integer.parseint (ID));5 returntotalfinal;6}Else{7 return Newtotalfinal ();8 }9 }Ten
1@RequestMapping (value = {"", "list"})2 PublicString List (totalfinal totalfinal, httpservletrequest request, httpservletresponse response, model model) {3page<totalfinal> page = Totalfinalservice.find (NewPage<totalfinal>(Request, response), totalfinal); 4Model.addattribute ("page", page);5Model.addattribute ("Totalfinal", totalfinal);6 return"Modules/pams/wage/finalwage";7}
@ModelAttribute: The annotated method, after the request entered, priority execution (can be said to be the first execution), the detailed use of Baidu can be;
@RequestMapping: Callout Value value={"", "List"} indicates that the request path can be a list or not, such as Http://127.0.0.1:8080/instr/a/pams/totalfinal/list and H Ttp://127.0.0.1:8080/instr/a/pams/totalfinal can enter the secondary method;
When using CTRL+H queries in programming tools such as Eclipse, it is difficult to find a method that is @RequestMapping: Callout value value={"", "list"} Callout
@RequestMapping and @modelattribute Routines