ModelAndView对象是Spring提供的一个对象
可以用来调整具体的JSP视图,也可以存储数据
@RequestMapping("/selectUserList")
public ModelAndView selectUserList() throws Exception {
ModelAndView modelAndView = new ModelAndView();
List<User> userList = userService.selectUserList();
modelAndView.addObject("userList",userList);
modelAndView.setViewName("userList.jsp");
return modelAndView;
}