做ssh框架整合的時候,出現了這個錯誤,網上一查了N久也沒發現答案
org.springframework.security.authentication.AuthenticationCredentialsNotFoundException: An Authentication object was not found in the SecurityContext
瞎忙活了三四個小時后 嘗試著激昂web.xml里的各個filter改變位置 終于泥啊馬的成功啦!!
方法是:把struct2的filter放在了最后面. 具體原因不詳,大家遇到類似的情況試試激昂filter的順序改變下.