How to pass model attributes from one Spring MVC controller to another controller?

后端 未结 10 1349
暗喜
暗喜 2020-11-27 13:19

I am redirecting from a controller to another controller. But I also need to pass model attributes to the second controller.

I don\'t want to put the model in sessi

10条回答
  •  醉酒成梦
    2020-11-27 13:59

    Using just redirectAttributes.addFlashAttribute(...) -> "redirect:..." worked as well, didn't have to "reinsert" the model attribute.

    Thanks, aborskiy!

提交回复
热议问题