I am trying to learn Spring MVC and Thymeleaf. I have the following part of HTML that displays a link and a button:
<ul th:each="item : ${typesMap}">
<li>
<a href="roomdetails.html" th:href="@{/roomdetails/${item.key}/${item.value}}">Linky</a>
<button type="button" th:text="${item.value}">Button Text</button>
</li>
</ul>
In two examples, the parameters in the link are never replaced. I always get something in the strings roomdetails/${item.key}/${item.value}in the HTML. The button works fine, although it will be displayed with the text found in $ {item.value} for each iteration of the loop.
Does anyone know why I cannot get the URLs in the format I want? From what I see, I do what the documentation tells me.
source
share