绝对路径跳转
public void toRedirect(HttpServletResponse response) throws Exception{
response.sendRedirect("https://www.baidu.com");
}
相对路径跳转
public ModelAndView toRedirect() {
ModelAndView modelAndView = new ModelAndView("/login.html");
return modelAndView;
}