问题如下:
controller AA给页面a发送了对象m,在页面a跳转到controller BB,那么contoller BB怎么得到对象m?
1 | @RequestMapping ( "/AA" ) |
2 | public ModelAndView userFillOrder( @ModelAttribute M m){ |
3 | return new ModelAndView( "a" , "m" ,m); |
4 | }; |
1 | @RequestMapping ( "/BB" ) |
2 | public ModelAndView userReviewOrder( @ModelAttribute N n, @ModelAttribute M m ){ |
3 | System.out.println(m.getId()); |
4 | return new ModelAndView( "/b" ); |
5 | } |