Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Html 按下链接时继续使用上一个变量url_Html_Spring_Spring Boot_Thymeleaf - Fatal编程技术网

Html 按下链接时继续使用上一个变量url

Html 按下链接时继续使用上一个变量url,html,spring,spring-boot,thymeleaf,Html,Spring,Spring Boot,Thymeleaf,我有一个URL,它包含一个固定的部分,后跟一个对象的UUID http://localhost:8080/gym/7663e7c4-e3da-4ad3-a652-b00f7d138fb3 我有一个链接到新页面的按钮,但新页面的URL必须与当前页面的URL相同,包括id+/review 这样,我可以在我的mvc控制器中获取id信息 <a class="nav-link" th:href="@{review}"> <button class="btn bt

我有一个URL,它包含一个固定的部分,后跟一个对象的UUID

http://localhost:8080/gym/7663e7c4-e3da-4ad3-a652-b00f7d138fb3
我有一个链接到新页面的按钮,但新页面的URL必须与当前页面的URL相同,包括id+/review 这样,我可以在我的mvc控制器中获取id信息

<a class="nav-link" th:href="@{review}">
            <button class="btn btn-outline-success my-2 my-sm-0" type="submit">Add review</button>
</a>
知道我做错了什么吗

th:href="@{/review}"
您需要将根添加到路径


编辑:关于th:href=@{{httpServletRequest.requestURI}}{uu}/review}

如果我这样做,我会在root+review结束,这不是我想要的,我想在这里结束:
th:href="@{/review}"