Failed to load ApplicationContext for … 에러

신형주·2023년 8월 7일
0

Failed to load ApplicationContext for …
...
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'cartController' defined in file [D:\Students\CampingSmore\target\classes\com\green\campingsmore\order\cart\CartController.class]: Unsatisfied dependency expressed through constructor parameter 1: No qualifying bean of type 'com.green.campingsmore.config.security.AuthenticationFacade' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}
...
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.green.campingsmore.config.security.AuthenticationFacade' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {}

테스트 작업 중 다음과 같은 에러가 발생했다.

에러가 길어서 헷갈리지만 Caused by문만 잘 읽으니 어디서 에러인지 알 수 있었다.

해결 : 스프링 시큐리티 클래스 AuthenticationFacade를 컨트롤러에 사용하고 테스트에는 작성하지 않아 생긴 오류였다.

profile
개발 공부 & 개발하면서 생각나는 것들 기록소

0개의 댓글