HomeAboutMeBlogGuest
© 2025 Sejin Cha. All rights reserved.
Built with Next.js, deployed on Vercel
🧚
[1기]최종 프로젝트 데브코스
/
📜
[팀13] 사각사각 ✏️
/
🔥
트러블슈팅
/
📢
배포시 의존성 주입 에러
📢

배포시 의존성 주입 에러

빌드까지 성공했는데 왜 안되는 것인가!!!!!!!!!!
 

상황 : 로컬 잘 돌아가고 git action 빌드까지 성공했으나 서버 깨져서 cloud watch log 확인.

notion image

원인 : 'org.springframework.security.crypto.bcrypt.bcryptpasswordencoder' that could not be found.

 

방법 : 의존성 주입 방식 변경

notion image
  1. SecurityConfig.java에 Bean을 등록해준다.
@Bean public PasswordEncoder passwordEncoder() { return new BCryptPasswordEncoder(); }
  1. BCryptPasswordEncoder를 생성자로 주입하는 것 대신에
    1. @Autowired로 의존성을 주입해야 한다.