@RequestMapping("/testRedirect") public String testRedirect(){ System.out.println("testRedirect"); return "redirect:/index.jsp"; }原理:找到ModelAndView 进入UrlBaseViewResolver类createView方法()