【发布时间】:2018-11-12 21:11:51
【问题描述】:
@Controller
@RequestMapping("success")
public class SuccessController {
private static Map<String, String>messages;
static {
messages = new HashMap<>();
messages.put("auth", "Authorisation");
}
@GetMapping("{act}")
public String success(@PathVariable String act, Model model){
model.addAttribute("msg", messages.get(act));
return "public/success";
}
问题是在像这个浏览器这样的双重请求检查之后,将第一个检查参数保存在 http-form 中,并且所有后续请求都保存了该子字符串。这会使所有以下请求崩溃。如何避免这种情况并清除请求地址?
【问题讨论】: