Spring Security passwordEncoder 설정 관련


Spring Security passwordEncoder 설정 관련

스펙 : Spring Boot, h2 db, jsp h2 db에 아래 표와 같이 관리자 데이터를 insert 후 id password admin 123 Spring security를 사용해서 로그인 로직 구현 중 로그인을 했는데 There is no PasswordEncoder mapped for the id "null"와 같은 에러를 만났음. 바로 갓글에 검색. 여러 블로그를 찾아보고 종합한 결과 필자는 security 설정에 password encoding 설정을 하지 않았고, 비밀번호가 텍스트 형태라서 에러가 났음. 해결방법 1. db에 저장된 pw앞에 prefix를 붙여서 저장하는 것 혹은 password를 비교할 때 prefix를 붙여주는 것. //db insert문 insert into ex..


원문링크 : Spring Security passwordEncoder 설정 관련