How to customize SPRING_SECURITY_LAST_EXCEPTION.message according to the error I get

前端 未结 3 1386
甜味超标
甜味超标 2021-01-03 05:27

I made a login system with Spring Security. This is my spring-security.xml

... 

       

        
3条回答
  •  囚心锁ツ
    2021-01-03 05:49

    This is an old question, but since the answer marked as correct actually contains a nasty subtle bug it should be noted that the correct solution would be to use built-in ExceptionMappingAuthenticationFailureHandler instead of the CustomAuthenticationFailureHandler suggested in the answer from @mdp.

提交回复
热议问题