thymeleaf模板 th:href 踩坑

 

 

 

使用 <a th:href="@{/product/add}" target="_blank">产品</a>

可以得到 <a th:href="/product/add" target="_blank">产品</a>

 

使用 <a th:href="@{/product/show(skuid=${product.id})}" target="_blank">产品</a>

可以得到 <a th:href="/product/show?skuid=12" target="_blank">产品</a>

 

 

使用 <a th:href="@{'/product/show/'+${product.id}}" target="_blank">产品</a>

可以得到 <a th:href="/product/show/12" target="_blank">产品</a>

 

posted @ 2017-08-15 18:06  moncat  阅读(11277)  评论(0编辑  收藏  举报