@Override
protected void configure(AuthenticationManagerBuilder auth) throws Exception {
auth.inMemoryAuthentication().passwordEncoder(new BCryptPasswordEncoder())
.withUser("admin").password(new BCryptPasswordEncoder().encode("123")).roles("ADMIN");
}
Spring Security 无法登陆,报错:There is no PasswordEncoder mapped for the id “null”
最新推荐文章于 2024-07-15 17:19:02 发布