解决Shiro中报错:Caused by: java.lang.IllegalArgumentException: Odd number of characters.

写Shiro认证密码加密报了一个错:Caused by: java.lang.IllegalArgumentException: Odd number of characters.

报错如下:

在这里插入图片描述

我的出错原因:new SimpleAuthenticationInfo()时密码写成了明文。

在这里插入图片描述

解决办法:doGetAuthenticationInfo方法中SimpleAuthenticationInfo入参密码为密文,不是明文。
发布了74 篇原创文章 · 获赞 19 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/weixin_43770545/article/details/99410790