Spring Security: There is no PasswordEncoder mapped for the id "null" 오류 해결
2023년 1월 10일에 작성되었고, 블로그를 이전하며 옮겨온 포스트입니다.여기에서 원본을 확인할 수 있습니다.문제 상황비밀번호 재설정 API를 개발하는 도중, 변경할 새로운 비밀번호가 기존 비밀번호와 일치하면 변경할 수 없도록 예외 처리를 진행하는 과정에서 There is no PasswordEncoder mapped for the id "null" 에러를 맞닥뜨렸다. 오류가 지시하고 있는 곳은 SignServiceImpl에서의 passwordEncoder.matches() 해당 부분이었다.원인if(passwordEncoder.matches(user.get().getPassword(), resetPasswordRequestDto.getPassword())) { ...}기존 등록된 사용자가 있다면 해당 ..