Thymeleaf Absolute URLs

Thymeleaf provides an easy way to create URLs using link expressions @{...}.

In this article, we will use absolute URLs in Thymeleaf template.

Thymeleaf Absolute URLs

Absolute URLs allow you to create links to other servers. They start by specifying a protocol name (http:// or https://).

In this example we create an absolute URL to

<a th:href="@{}">Thymeleaf</a>

The output will be the following:

<a href="">Thymeleaf</a>