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

来源:3-7 多个安全配置共存

又见风城飘雪时

2020-12-15

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

图片描述

写回答

3回答

马什么梅

2023-03-27

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

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

@Bean
@Override
public AuthenticationManager authenticationManagerBean() throws Exception {
    return super.authenticationManagerBean();
}
1
0

kongieg

2022-08-11

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

0
0

接灰的电子产品

2020-12-15

看下源码,passwordencoder 没有配置好

0
0

Spring Security+OAuth2 精讲,打造企业级认证与授权

一站式掌握主流安全框架与行业解决方案,从容应对各种安全难题。

1042 学习 · 316 问题

查看课程