- Mastering Spring 5.0
- Ranga Rao Karanam
- 65字
- 2021-07-02 22:12:12
Flow 4 - Controller redirecting to a View with ModelAndView
In the previous flow, we returned a view name and populated the model with attributes to be used in the view. Spring MVC provides an alternate approach using ModelAndView. The controller method can return a ModelAndView object with the view name and appropriate attributes in the Model. In this flow, we will explore this alternate approach.