To Use redirect:/ in ModelAndView return type method, you are try following
ModelAndView modelAndView = new ModelAndView("redirect:/abc.htm");
modelAndView.addObject("modelAttribute" , new ModelAttribute());
return modelAndView;
You can also return home page using String returntype if you do not need any Model in home page
@RequestMapping(value = "/home.htm", method = RequestMethod.GET)
public String homePage() {
return "home";
}
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…