我在我的应用程序中使用Spring Security 4.2.2.RELEASE。一旦发生超时,然后用户点击任何URL,它就会被重定向到注销页面,一旦认证成功,它就会重定向到默认的主页,而不是请求的页面。
web xml如下:
<bean id="logoutSuccessHandler" class="org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler"> <property name="useReferer" value="true"/> </bean> <security:form-login login-page="/login" authentication-failure-url="/login_error" username-parameter="username" password-parameter="password" default-target-url="/home" always-use-default-target="false" />
我希望它在身份验证正确后重定向到请求的页面。我已经读过Spring Security默认提供此功能。但它没有用,所以我试图使用SimpleUrlLogoutSuccessHandler来实现。但仍无法找到方法。那么这里可能出现什么问题?
湖上湖
相关分类