https://github.com/abhishekomp/thymeleaf-demo
thymeleaf-demo in Spring Boot project
https://github.com/abhishekomp/thymeleaf-demo
html-table thymeleaf-fragment thymeleaf-layout thymeleaf-layout-dialect
Last synced: 23 days ago
JSON representation
thymeleaf-demo in Spring Boot project
- Host: GitHub
- URL: https://github.com/abhishekomp/thymeleaf-demo
- Owner: abhishekomp
- Created: 2024-09-21T21:28:07.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-11-13T21:06:27.000Z (over 1 year ago)
- Last Synced: 2025-06-26T11:49:44.740Z (11 months ago)
- Topics: html-table, thymeleaf-fragment, thymeleaf-layout, thymeleaf-layout-dialect
- Language: HTML
- Homepage:
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Thymeleaf layout dialect demonstration
This project demonstrates usage of Thymeleaf layout dialect in a Spring Boot application.
## Project Overview
This Spring Boot application showcases the following features:
- Usage of Thymeleaf layout dialect to define the base layout that other web pages can use to feed their content.
- Usage of layout dialect directive `layout:decorate`
- Usage of `layout:title-pattern="$CONTENT_TITLE"` to dynamically specify the web page title.
- Passing variable to the html for Thymeleaf to perform the rendering of data.
- Usage of HTML table whose rows are populated by using Thymeleaf's th:each directive.
- Formatting of date for display purpose using #temporals.format (thymeleaf)
## Prerequisites
Before you begin, ensure you have the following installed:
- Java Development Kit (JDK) 17 or later
- Apache Maven
## Project Structure
The project (multi-module maven project) consists of the following applications:
- `thymeleaf-demo`: A Spring boot application that demonstrates usage of Thymeleaf fragments.
- `thymeleaf-layout-dialect-demo`: A Spring boot application that demonstrates usage of Thymeleaf layout dialect feature.
## Usage
Once the application is running, you can interact access the application using following endpoint:
- thymeleaf-demo: http://localhost:8080
- thymeleaf-layout-dialect-demo = http://localhost:8081
The above endpoint will show the main page for the web application.
Happy coding!