Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我@Requestparam /register?name=newname从一个页面传递过来。但是下次我调用页面/register/confirm时,它会在 url 中显示参数,例如/register/confirm?name=newname。如何避免这种情况?
@Requestparam
/register?name=newname
/register/confirm
/register/confirm?name=newname
我最近有同样的问题。这可能会发生,因为name它与@ModelAttribute. 你有ModelAttribute同样的看法吗?
name
@ModelAttribute
ModelAttribute
我不知道你的观点是如何工作的,但最好你参考@RequestParamas${param.name}而不是name(如果你还没有)
@RequestParam
${param.name}