可以从模型属性中获取HREF中的百里香eaf参数

发布于 2025-01-28 17:49:47 字数 294 浏览 1 评论 0原文

我是胸腺的新手。 我无法在href中获得systemid,但是我可以在< p th:文字中做到这一点...

有什么问题? pls,help

我的代码

结果

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

My code

Result

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

滥情哥ㄟ 2025-02-04 17:49:47

只需更换此代码
{|/$ {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

谁的年少不轻狂 2025-02-04 17:49:47

链接的正确语法应为:

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})}"

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文