Spring Security报错:There is no PasswordEncoder mapped for the id “null“
错误描述,如下图:
解决方案:
关于 Spring Security 5.0.X 的说明:
在Spring Security 5.0之前,PasswordEncoder 的默认值为 NoOpPasswordEncoder 既表示为纯文本密码,在实际的开发过程中 PasswordEncoder 大多数都会设值为 BCryptPasswordEncoder ,但是这样会导致几个问题:
1、在应用程序中使用 BCryptPasswordEncoder 编码方式编码后的密码,很难轻松的迁移;
2、密码存储后,会再次
原创
2020-11-17 15:07:35 ·
270 阅读 ·
0 评论