I have created a html template for emails.
Now, i am putting a variable to the context:
context.setVariable("invoiceId", invoiceId);
In the template I have an tag:
<p><span>To accept the invoice, click <a th:href="http://localhost/accept/${invoiceId}">HERE</a></span></p>
but when I am running the app, I get:
org.thymeleaf.exceptions.TemplateProcessingException: Could not parse as expression: "http://localhost/accept/${invoiceId}" (template: "mailTemplate" - line 7, col 47)
How can I use the ${invoiceId} variable in this case?