Programming/Java

Error : Consider defining a bean of type 'org.springframework.security.crypto.password.PasswordEncoder' in your configuration.

개발자 쓔쓔 2023. 4. 17. 18:43
반응형

23년 4월에는 스프링3을 시작하지 얼마 안된분들은, 아직은 2를 써도 되지않을까라는 의문을 던져봅니다.

물론 제가 스프링을 잘 몰라서 해매고 있습니다.. 근본적으로 버전이 문제가 아닐수도 있을것같긴합니다...


Action:
Consider defining a bean of type 'org.springframework.security.crypto.password.PasswordEncoder' in your configuration.

Process finished with exit code 1

 

해결방법

SecurityConfig에 PassworEncoder를 직접 Bean등록을 해줍니다.

@Bean
public PasswordEncoder passwordEncoder(){
    return new BCryptPasswordEncoder();
}

728x90
반응형