更新时间:2023-12-01 15:18:34
使用form-login
时,默认的AuthenticationEntryPoint
重定向到登录页面.
When you are using form-login
the default AuthenticationEntryPoint
redirects to the login page.
You can override this by injecting a custom entry point using the entry-point-ref
attribute.
您可以将Http403ForbiddenEntryPoint
的代码用作准则(或者,如果您想要的只是发送给客户端的响应代码,则可以直接使用该代码).
You can use the code for Http403ForbiddenEntryPoint
as a guideline (or use that directly if all you want is a response code sent to the client).