爱程序网

spring防止表单重复提交

来源: 阅读:

import org.springframework.web.servlet.mvc.support.RedirectAttributes;

使用RedirectAttributes存放需要传递的数据,然后直接重定向请求。

redirectAttributes.addFlashAttribute("error.password.error","密码格式不正确");
redirectAttributes.addFlashAttribute("user",user);

String returnStr = "redirect:/login";

关于爱程序网 - 联系我们 - 广告服务 - 友情链接 - 网站地图 - 版权声明 - 人才招聘 - 帮助