2
我有settings page
和控制器是为他Spring MVC的,Thymeleaf URL
@RequestMapping(value = "/settings/password/change", method = RequestMethod.GET)
public String changePassword(Model model) {
return "account/changepassword";
}
在此页面上有header
其中包含myaccount
链接: <a class="link" th:href="${currentUser.nickname}"><li class="li">User profile</li></a>
但如果我打开头settings page
链接有网址:localhost:8080/settings/password/change/profilename
。而不是我需要的URL如:localhost:8080/profilename
。我如何做到这一点?
非常感谢你,它帮助到我! –
不客气。 –