请稍等 ...
×

采纳答案成功!

向帮助你的同学说点啥吧!感谢那些助人为乐的人

多安全配置完成后: There is no PasswordEncoder mapped for the id "null"

老师,我这里跟着操作多个安全配置,修改完成,表单登录页面没问题,登录之后 出现:

图片描述

正在回答 回答被采纳积分+3

3回答

马什么梅 2023-03-27 22:23:26

我也是,跟视频做的。报错There is no PasswordEncoder mapped for the id "null"。

视频里少录了内容,源码里有个Bean。加上就好了。

@Bean
@Override
public AuthenticationManager authenticationManagerBean() throws Exception {
    return super.authenticationManagerBean();
}
1 回复 有任何疑惑可以回复我~
kongieg 2022-08-11 17:51:15

application.yml配置文件里spring.security.user.password需要是编码过的密码,比如{bcrypt}$ljaf...

0 回复 有任何疑惑可以回复我~
接灰的电子产品 2020-12-15 18:42:14

看下源码,passwordencoder 没有配置好

0 回复 有任何疑惑可以回复我~
问题已解决,确定采纳
还有疑问,暂不采纳
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号