「Spring」@SessionAttributeを利用するサンプル
説明
@SessionAttributeを使用してセッションスコープのオブジェクト情報を取得する。
サンプルコード
@PostMapping(path = "update")
String update(@Validated Form form, BindingResult result,
@SessionAttribute UserInfo userInfo) { // 引数として直接受け取れる
// some code
return "redirect:/employees/update?stage";
}