ModelAndView
, as its name suggests, contains the model, and the name of the view. ModelMap
, in contract, only contains information about the model.
Your example would have been written (in "old" Spring) as
public ModelAndView handleRequest(HttpServletRequest request, HttpServletResponse response)
{
return new ModelAndView("setup", ORDER, new Order());
}