Thymeleaf

Thymeleaf is a relatively new template engine; the first version was released in 2011. Thymeleaf is pretty similar to HTML, which doesn't require any servlet containers to preview content in a browser. This is exploited in order to allow designers to work on the look and feel of the application, without deploying it.

Let's review how to convert a web template build, using HTML and Bootstrap, into a Thymeleaf template, in order to see that this template engine is not intrusive. The following code represents a very basic HTML template:

<!DOCTYPE html><html lang="en">  <head>    <meta charset="UTF-8"/>    <title>Default title</title>    <meta name="viewport" content="width=device-width,     initial-scale=1"/> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/ ...

Get Software Architecture with Spring 5.0 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.