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

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

报错如下:

在这里插入图片描述

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

在这里插入图片描述

解决办法:doGetAuthenticationInfo方法中SimpleAuthenticationInfo入参密码为密文,不是明文。
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章