SpringMVC 的RedirectAttributes

作用:携带model 重定向跳转到下一controller

@RequestMapping(value = "smap")
public String getSmap(RedirectAttributes redirectAttributes) throws IOException{
String alertInfo="操作成功!!";
redirectAttributes.addFlashAttribute("alertInfo", alertInfo);
return "redirect:/core/layout/public/msgClose";

}

猜你喜欢

转载自blog.csdn.net/i929479824/article/details/91420036