Spring security,我需要处理CredentialsExpiredException,但它不起作用

Spring security,我需要处理CredentialsExpiredException,但它不起作用,spring,spring-security,Spring,Spring Security,我使用的是spring 3.2.0和spring security 3.1.2,我使用自定义AuthenticationProvider和ExceptionMappingAuthenticationFailureHandler设置了webapp spring mvc安全性,以正确处理身份验证状态 自定义AuthenticationProvider工作正常,并且 抛出启动时正确映射的CredentialsExpiredException我在webapp启动期间对其进行了调试,并检查Exceptio

我使用的是spring 3.2.0和spring security 3.1.2,我使用自定义AuthenticationProvider和ExceptionMappingAuthenticationFailureHandler设置了webapp spring mvc安全性,以正确处理身份验证状态

自定义AuthenticationProvider工作正常,并且 抛出启动时正确映射的CredentialsExpiredException我在webapp启动期间对其进行了调试,并检查ExceptionMappingAuthenticationFailureHandler是否正确设置;在调试期间,当CredentialsExpiredException抛出时,调试器停止在onAuthenticationFailure方法,但在该方法中,异常管理的不是抛出的CredentialsExpiredException,而是UsernameNotFoundException,因此我无法获得credendial expired路径的工作


我错过了什么?

我解决了自己的问题,我离开了

<beans:property name="defaultFailureUrl" value="/login/login.jsp?login_error=1"/>
现在正确的异常被处理了