Thymeleaf 2.1 + Spring Boot - how do I create a master template and only inject the content part/fragment?
So I'm using Spring Boot with the Thymeleaf dependency (which is currently version 2.1) and it's been great experience so far.
But, having to duplicate my template files is not so great. I did use some th:include / th:replace with some fragments but that unfortunately does not eleminate the need to make copies of the entire template/view file.
I'd like to know if there's a way to maintain only one template (master) file which may or may not contain other included/replaced fragments?
So le'ts say that for majority of my pages I want some layout to be used. I would then only create the files that contain the main content part.
Is that possible and how do I proceed, considering I'm using Spring Boot and have not had to basically touch anything apart from creating the template files in order to start using Thymeleaf.