controller里面默认使用转发的方式来定位视图的。
现在重定向到别的controller。
@RequestMapping("/test01")
public String test01(){
System.out.println("test01()");
return "redirect:hello.do";
}
@RequestMapping("/hello.do")
public ModelAndView hello(){
System.out.println("hello()");
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("hello");
modelAndView.getModel().put("msg", "123abc");
return modelAndView;
}