Reusable Thymeleaf Fragments: th:fragment, th:replace, and Parameterized Components
Define markup once with th:fragment, include it with th:replace, and pass data through positional parameters. A worked Spring Boot example plus the insert/replace difference, dynamic selection, and common mistakes.