Thymeleaf provides an easy way to create URLs using link expressions @{...}.
In this article, we will discuss how to use URLs with parameters in Thymeleaf template.
Thymeleaf URLs with parameters
To add query parameters to a URL you have to put them in parentheses
( )
.
For example, one query parameter added to an URL will look like the following:
This will produce the following output:
Note that any special character used will be HTML-escaped.
To provide many parameters, separate them with commas:
Above example will be rendered like the following:
Comments
Post a Comment