springmvc的一个跳转特性

springmvc的一个跳转特性:

一般配置了视图解析器后,

1,要跳转return "",,

2,也可不return,这时直接用requestMapping中的东西跳转

3,如果在参数中加了HttpServletResponse就只能用return “”

        @RequestMapping(value= "/bank/subAcount/list")

public void subAcountList1(TbClientLogVo tbClientLogVo,Model model,HttpSession session,HttpServletResponse response,HttpServletRequest request) throws IOException{

System.out.println("hello word!2");

model.addAttribute("list", "1");

//response.getWriter().print("2421343543");

return "/bank/subAcount/list";

}

@RequestMapping(value = "/bank1/subAcount/list")// HttpSession session, 

public void subAcountList(TbClientLogVo tbClientLogVo,Model model,HttpServletRequest request)  {

        System.out.println("hello word");

}

猜你喜欢

转载自yuhuiblog6338999322098842.iteye.com/blog/2346965