У меня есть это определение bean-компонента в моей конфигурации:
public class MyAuthenticationFailureHandler extends SimpleUrlAuthenticationFailureHandler {
private String defaultFailureUrl;
public String getDefaultFailureUrl() {
return defaultFailureUrl;
}
public void setDefaultFailureUrl(String defaultFailureUrl) {
this.defaultFailureUrl = defaultFailureUrl;
}
@Override
public void onAuthenticationFailure (HttpServletRequest request, HttpServletResponse response,
AuthenticationException exception) throws IOException, ServletException {
// do logging and login failure counts etc...
logger.debug("Sending redirect to:"+defaultFailureUrl);
response.sendRedirect(defaultFailureUrl);
}
И мой context.xml:
<bean id="failureHandler" class="com.me.authenticator.MyAuthenticationFailureHandler">
<property name="defaultFailureUrl" value="/home" />
</bean>
И в журналах я получаю сообщение «Отправка перенаправления на: null»
почему defaultFailureUrl имеет значение null?Я устанавливаю значение свойства в контексте.Что я тут не так делаю?