In this section, we will explain in detail what a template engine is, and how to use Spring Thymeleaf to implement the view presentation.
Using Spring Thymeleaf for the view
Understanding template engines
Standard Java Enterprise Edition (Java EE) applications used JSPs to generate presentation views for the end user. JSP is a mature technology that enables users to use embedded Java code as well as Java Server Tag Library (JSTL) elements, which will, in turn, execute Java code to generate a presentation view. All JSPs are eventually compiled as a servlet.
But mixing this Java code with presentation-specific code (HTML, CSS, and many more) is cumbersome and makes separation of concern difficult. Furthermore, presentation views...