org.apache.shiro.authc.AuthenticationException: Authentication failed for token submission [org.apache.shiro.authc.UsernamePasswordToken - starzou, rememberMe=false]. Possible unexpected error? (Typical or expected login exceptions should extend from AuthenticationException)
<bean id="authorizingRealm" class="com.hk3t.core.security.CmsAuthorizingRealm">
<property name="credentialsMatcher">
<bean class="org.apache.shiro.authc.credential.HashedCredentialsMatcher">
<property name="hashAlgorithmName" value="MD5"/>
<!-- true means hex encoded, false means base64 encoded -->
<property name="storedCredentialsHexEncoded" value="true"/>
<!-- 迭代次数 -->
<property name="hashIterations" value="1" />
</bean>
</property>
</bean>
如果user的密码是明文密码,但是如果这样设置
<property name="hashAlgorithmName" value="MD5"/>
就等于说指定密码的加密方式是MD5,但是此时user的密码是明文密码,所以这样就会报错
解决的办法就是将user的密码用MD5加密,就要就不会有问题了