Skip to main content

Model

Learn Model (Model & View, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes Model is the Spring MVC interface that carries data from the controller to the view; you add named objects and the view reads them while rendering. Declare it as a handler parameter: String list(Model model) ; Spring creates it and passes it in. Add data with model.addAttribute("name", value) and return the view name as a String .

More lessons in Model & View