SPRING CONCEPTS
MVC Model
Spring Concepts / MVC Model
An MVC Model contains the data passed to a view.
Understand the idea
The controller adds named attributes; the template reads those names. The model may include a list of documents, a form DTO, or an action URL. It is a presentation-data container rather than a database connection.
A concrete example
model.addAttribute("todos", service.list());
// In the template:
th:each="todo : ${todos}"In the application
The MVC manual uses todos, todoForm, and action as model attribute names.
The attribute names in the controller and template must match exactly.
Detailed walkthrough: Trace a Spring MVC request →