[ERROR] Could not autowire. No beans of 'PasswordEncoder' type found.

DY_DEV·2023년 6월 23일
1

IntelliJ

목록 보기
4/4

문제

팀 프로젝트를 진행하면서 @Autowired / Could not autowire. No beans of '~' type found.라는 오류를 종종 마추진 적이 있다. 서버 실행은 되고, 기능 구현에 문제는 없었지만 해당 내용을 해결하고싶어 구글링을 열심히 한 적이 있다. 그 당시 얻은 결론은 "IntelliJ 자체의 문제니 그냥 무시하고 넘어가는 것"이었다. https://www.inflearn.com/questions/170577/could-not-autowire-no-beans-of-datasource-type-found

일단 몇몇 능력자분들이 공통적으로 제시한 해결책을 시도해봤다.

Help에서 Edit Custom Properties 누른 다음
idea.spring.boot.filter.autoconfig=false 를 추가

거의 유일했던 방법을 시도하고 intelliJ를 재시작 해도 변화는 없었다. 그래, 영한님이 괜찮다고 하시고 실행도 잘 되는데 그냥 넘어가야지! 하며 결국 문제를 보류했었다.

하지만 오늘은 해당 문제 때문에 프로젝트 실행이 불가능했다. 어떻게든 해결을 하고 넘어가야하는 상황, "인텔리제이 Could not autowire. No beans of 'PasswordEncoder' type found."라고 구체적인 질문을 하자. 꽤 빠르게 답을 얻을 수 있었다.

https://stackoverflow.com/questions/72769680/intellij-idea-error-could-not-autowire-no-beans-of-httpsecurity-type-found

<해결>

0개의 댓글