Skip to main content

Layouts

Learn Layouts (Spring MVC + Thymeleaf, Spring MVC) with worked examples, diagrams and interview questions. Free on JavaSchoolLab.

Fresher Notes Layout : one master template (menu, header, footer, CSS) that every page reuses, so each page only supplies its own content. Two ways : plain Thymeleaf fragments passed as parameters, or the thymeleaf-layout-dialect library with layout:decorate . Goal : change the site menu in one file and see it on every page.

More lessons in Spring MVC + Thymeleaf