Spring security 覆盖消息[LDAP:错误代码32-无此类对象];嵌套异常是javax.naming.NameNotFoundException

Spring security 覆盖消息[LDAP:错误代码32-无此类对象];嵌套异常是javax.naming.NameNotFoundException,spring-security,spring-ldap,Spring Security,Spring Ldap,我正在使用SpringLDAP安全性对用户进行身份验证。在my.jsp中,我有: <c:if test="${not empty param.login_error}"> <div class="errorText">${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message}</div> </c:if> 我想要的是:用一个更用户友好的消息覆盖此消息,就像我覆盖了坏凭据消息一样 提前感谢

我正在使用SpringLDAP安全性对用户进行身份验证。在my.jsp中,我有:

<c:if test="${not empty param.login_error}">
   <div class="errorText">${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message}</div>
</c:if>
我想要的是:用一个更用户友好的消息覆盖此消息,就像我覆盖了坏凭据消息一样


提前感谢您的建议。

我想您也必须覆盖AuthenticationServiceException的消息。是的,这就是我的想法,因为查找和验证用户的流程是:ldapaauthenticationprovider实现AuthenticationProvider,authenticate方法是引发异常的方法。谢谢你的回复。
[LDAP: error code 32 - No Such Object]; nested exception is javax.naming.NameNotFoundException: [LDAP: error code 32 - No Such Object]; remaining name ''