reading-notes-ma


Project maintained by mohnalkhateeb Hosted on GitHub Pages — Theme by mattgraham

Spring

Serving Web Content with Spring MVC

Spring MVC and Thymeleaf: how to access data from templates

In a typical Spring MVC application, @Controller classes are responsible for preparing a model map with data and selecting a view to be rendered. This model map allows for the complete abstraction of the view technology and, in the case of Thymeleaf, it is transformed into a Thymeleaf context object (part of the Thymeleaf template execution context) that makes all the defined variables available to expressions executed in templates.