Dac*_*ein 1 query-string thymeleaf
如何在Thymeleaf中创建URL:
/user/map?userId=1&mapId=2
Run Code Online (Sandbox Code Playgroud)
在百里香模型中,我可以访问$ {user.id}和$ {map.id}。
我试过了:
th:href="@{'/user/map/update/?userId=' + ${user.id} + '&mapId=' + ${map.id}}"
Run Code Online (Sandbox Code Playgroud)
但它给出:
The reference to entity "mapId" must end with the ';' delimiter.
Run Code Online (Sandbox Code Playgroud)
<a th:href="@{/user/map(userId=${user.id},mapId=${map.id})}">
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
712 次 |
| 最近记录: |