问题描述:There was an unexpected error (type=Internal Server Error, status=500). There is no PasswordEncoder mapped for the id “null” java.lang.IllegalArgumentException: There is no PasswordEncoder mapped for the id “null”
发送包含用户名和密码的GET请求,在登陆界面输入用户名没问题,但是输入密码后跳转页面报错:There is no PasswordEncoder mapped for the id “null”
这是我的config文件
/**
* security configuration class
*/
@EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter {
@Override
protected void configure(HttpSecurity http) throws Exception{
http.

"本文档介绍了在Spring Security中遇到的一个错误:ThereisnoPasswordEncodermappedfortheid“null”。该错误源于Spring Security 5.0以后默认密码编码器的改变。解决方案是在配置中添加'{noop}
最低0.47元/天 解锁文章
515

被折叠的 条评论
为什么被折叠?



