阅读背景:

Spring Security 无法登陆,报错:There is no PasswordEncoder mapped for the id “null”_Canon_in_D_Major的博客

来源:互联网 

编写好继承了WebSecurityConfigurerAdapter类的WebSecurityConfig类后,我们需要在configure(AuthenticationManagerBuilder auth) 方法中定义认证用于信息获取来源以及密码校验规则等。(configure函数名字不重要,官方用的好像是configureGlobal(……),重要的是在这个被@EnableWebSecurity或@EnableGlobalMethodSecurity,或者@EnableGlobalAuthentication注解 的类中配置了AuthenticationManagerBuilder)。编写好继承了WebSecurityConfigurerAdapter类的WebSecurity




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: