PasswordEncoder1 TIL) Lv2 피드백 복습하며 배운 정보들 passwordEncoder 클라이언트가 입력한 비밀번호를 암호화해 주는 인터페이스 //비밀번호 확인 (password 가 다른 경우) if(!passwordEncoder.matches(password, user.getPassword())) { throw new IllegalArgumentException("비밀번호가 일치하지 않습니다."); } // 사용자가 입력한 Password와 인코딩한 상태에서의 비밀번호를 비교해주는 메서드 인터페이스이기 때문에 사용하려면 Configuaration에서 @Bean으로 등록해줘야 한다. @Bean public PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); } 객체를 생성하면 빈으로 등.. 2023. 7. 12. 이전 1 다음