可以从模型属性中获取HREF中的百里香eaf参数
I'm new to thymeleaf.
I can't get systemId in th:href ,but I can do it in <p th:text...
What's the problem? Pls, help
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
只需更换此代码
{|/$ {systemId}/kreanes/$ {repares.getReleaseId()} |}”
&lt; a th:href =“ @ |}””
“ | |”是问题的解决方案
https://www.thymeleaf.org/doc/doc/doc/doc/doc/tutorials /3.0/usingthymeleaf.html 在这里阅读4.8
Just replace this code
<a th:href="@{|/${systemId}/releases/${release.getReleaseId()}|}"
<a th:href="@{|/${systemId}/releases/new|}"
the "| |" is solution of the problem
https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html read here 4.8
链接的正确语法应为:
1:
th:href =“@{/{id3}/earsease/{id3}(id3 = $ {repares.rease.releaseid})}”
或
1::
th:href =“@{/{id3}/earseas/{id2}(id3 = $ {repares.releaseId},id2 = $ {repares.rease.releaseId})}}}}}}}
(如果您真的想要使用2个不同的变量作为相同的值。)
2:
th:href =“@{/earsease/new/new/{id = $ {systemid})}“
>The correct syntax for your links should be:
1:
th:href="@{/{id3}/releases/{id3}(id3=${release.releaseId})}"
or
1:
th:href="@{/{id3}/releases/{id2}(id3=${release.releaseId}, id2=${release.releaseId})}"
(if you really want to use 2 different variables for the same value.)
2:
th:href="@{/releases/new/{id}(id=${systemId})}"