需要实现controller之间的重定向跳转,并需要携带mode里面的数据 数据以get请求的反方式拼接在redirect url 后面 @RequestMapping(params="method=index") public ModelAndView index() { RedirectView redirectView = new RedirectView("/Demo.do?method=index2", true, true); ModelAndView mav = new ModelAndView(redirectView); mav.addObject("attr1", "attr1Value"); mav.addObject("attr2", "attr2Value"); return mav; }
redirectview 用法,渐进理解,目前只了解如何使用
最新推荐文章于 2025-02-11 14:25:21 发布