我有一些外部网址付款。付款完成后,它会重定向给我。
@RequestMapping(value = "/first", method = RequestMethod.GET)
public String first(@RequestParam("id") String id) {
doSomething(id);
return "redirect:/externalurl"
}
// This method is called from external url
@RequestMapping(value = "/second", method = RequestMethod.GET)
public String second() {
// I want to get here id from first call
}
是否有可能以某种方式使用RedirectAttributes
或其他类似的做法,例如在first()
方法中添加它并在second()
方法中获取它?