This is the query all the administrator information:
@ RequestMapping ("/admin/pass ")
Public String list (Model Model) {
ListList=adminService. QueryAllAdmin ();
Model. The addAttribute (" listAdmin ", a list);
return "index";
}
This is the query all image information:
@ RequestMapping ("/index ")
Public String list (Model Model) {
ListList=picService. QueryAllPic ();
Model. The addAttribute (" list ", a list);
return "index";
}
They all need to return to the index this page
The front is a JSP
But
If the access is:/admin/pass for less than the picture information
If access is:/index for less than the administrator information
@ RequestMapping path cannot be repeated again, this is a page and just need the two data, what should I do?
CodePudding user response:
JSP is thereAcceptable, so if we can solve this problem, of course, also can change a way of receiving, in this way because I only know this
CodePudding user response:
Add these two lines to the bottom, within that method in the request line,List
Model. The addAttribute (" listAdmin ", a list);
CodePudding user response:
Such complains, Java. Lang. NullPointerException