通过index映射到某个方法,返回一个ModelAndView,Model是查询出的数据,View为跳转的页面,jsp可以获取Model里面的数据。 @RequestMapping("/index") public ModelAndView index(){ ModelAndView mav = new ModelAndView(); //查询数据 //mav.setView(); return mav; }
通过index映射到某个方法,返回一个ModelAndView,Model是查询出的数据,View为跳转的页面,jsp可以获取Model里面的数据。