为了账号安全,请及时绑定邮箱和手机立即绑定

问下老师这个异常是什么情况

4383 [main] WARN org.apache.shiro.authc.AbstractAuthenticator - Authentication failed for token submission [org.apache.shiro.authc.UsernamePasswordToken - mark, rememberMe=true].  Possible unexpected error? (Typical or expected login exceptions should extend from AuthenticationException).

java.lang.IllegalStateException: Configuration error:  No realms have been configured!  One or more realms must be present to execute an authentication attempt.

at org.apache.shiro.authc.pam.ModularRealmAuthenticator.assertRealmsConfigured(ModularRealmAuthenticator.java:161)

at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:264)

at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:198)

at org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:106)

subject.login(token);//这一行报错


正在回答

2 回答

正解,完美的解决了我的问题,感谢,好像是要先把 realm注入进来

0 回复 有任何疑惑可以回复我~
defaultSecurityManager.setRealm(simpleAccountRealm);


0 回复 有任何疑惑可以回复我~

举报

0/150
提交
取消

问下老师这个异常是什么情况

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信