这里是这样的,提交表单后,重定向,在以前的函数里面设置了一些前端的信息。
重定向后,还能显示出来。
最后指定的函数:
@GetMapping("/")
public String getIndex(){
return "index";
}
调用的函数:
@PostMapping("/check")
public String checkCipherAndSendEmail(@RequestParam("cipherString") String cipherString,
@RequestParam("emailString") String emailString,
@RequestParam("urlString") String urlString,
@RequestParam("Ticket") String ticket,
@RequestParam("RandStr") String randStr,
HttpServletRequest request,
RedirectAttributes redirectAttributes){
//TODO something
//业务代码
redirectAttributes.addFlashAttribute("msg", "提示:文件下载成功,正发往指定邮箱");
return "redirect:/";
}