ログインリンクをクリックしたページにユーザーをリダイレクトしようとしています。(認証されていないユーザーの場合、ページは読み取り専用ですが、ログインしているユーザーの場合は書き込み可能です。) ログイン後に、ユーザーを元の場所に戻すにはどうすればよいですか?
このリンクを使用してログインページにユーザーに送信しています: /spring_security_login?redirect=/item5
。ログイン後、ユーザーがページにリダイレクトされることを期待してい/item5
ます。ただし、常にページにリダイレクトされ/
ます。
私が使用している構成は次のとおりです。
<http use-expressions="true">
<intercept-url pattern="/**" access="permitAll" />
<form-login authentication-success-handler-ref="simpleUrlAuthenticationSuccessHandler"/>
</http>
<beans:bean id="simpleUrlAuthenticationSuccessHandler"
class="org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler">
<beans:property name="defaultTargetUrl" value="/"/>
<beans:property name="targetUrlParameter" value="redirect"/>
</beans:bean>
思うようtargetUrlParameter
に取り上げられていないようです。Spring Security 3.1.4 を使用しています