">登出链接特别是部分:
Given a base URL and a relative URL (that does not begin with a slash), a full URL is derived as follows:
If the base URL ends with a slash the full URL is derived by appending the relative URL to the base URL. For example, if the base URL is http://nosite.com/dir1/dir2/ and the relative URL is gee.html, the derived URL is http://nosite.com/dir1/dir2/gee.html.
If the base URL doesn't end with a slash, the last piece of the base URL is considered a resource, so the full URL is derived by appending the relative URL to the parent of the base URL. For example, if the base URL is http://nosite.com/dir1/dir2 and the relative URL is gee.html, the derived URL is http://nosite.com/dir1/gee.html
您正在使用相对路径,通过在 url 开头使用“/”使其成为绝对路径:
<a href="<c:url value="/j_spring_security_logout"/>">Log out</a>