A jump feature of springmvc

A jump feature of springmvc:

After the view resolver is generally configured,

1. To jump return "",,

2, you can also not return, then use the thing in requestMapping to jump directly

3. If you add HttpServletResponse to the parameter, you can only use 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");

}

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326414408&siteId=291194637