使用shiro时出现的问题及解决方法

1、一直出现: org.apache.shiro.authc.AuthenticationException: Authentication failed for token submission [org.apache.shiro.authc.UsernamePasswordToken - zhang, rememberMe=false].  Possible unexpected error? (Typical or expected login exceptions should extend from AuthenticationException).

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

解决方法: 先将.ini中的内容写到.txt文件中,之后再将.txt重命名为.ini就解决了。

你可能感兴趣的:(java,error,shiro)