Spring MVC Thymeleaf Tutorial with CRUD Example and Source Code

In this tutorial, we study Spring MVC with Thymeleaf. We check how to create Thymeleaf Fragment and use it, how to submit POST and GET forms, loop through objects list using Thymeleaf. We also check how to accept data using PathVariable, RequestParam, ModelAttribute. Source code can be found here: 00:00 - Intro 00:10 - Create Empty Spring Boot project 00:57 - What is resources folder for 01:40 - Serve static on Spring Boot 03:03 - What is Spring Controller. Example of Controller 07:50 - Send data from Thymeleaf to Controller using RequestParam. Submit GET HTML Form 16:15 - Send data from Controller to Thymeleaf using Spring Model attribute 18:46 - Connect CSS to Thymeleaf page 21:00 - Create Thymeleaf Fragment and add it on page 25:25 - Thymeleaf For-Each Example 35:00 - HttpServletRequest Session Example 39:25 - Receive data in Controller from Thymeleaf POST Form submit. Spring MVC Redirect Example 48:42 - Edit Book Functionality: fill Thymeleaf HTML Form with values from Controller. PathVariable example 57:00 - Edit Book Functionality: generate dynamic URL using Thymeleaf href 1:02:52 - Delete Book Functionality
Back to Top