-
found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} 에러Error 해결모음 2022. 8. 19. 19:46728x90
개발 연습을 하다가
[com.psj.air_reservation.user.UserService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)} 라는 에러가 발생하였다.
ServiceLogic에서 interface를 implements 해서 이용하는 경우가 많은데
이때 해당 로직이 @Service라는 것을 알려줘야 한다.
그렇지 않으면 오류가 지속적으로 발생한다.
저렇게 붙혀넣으면 해결이 된다
저렇게 했는데 안됐을시
1. 서비스 인터페이스 제거, 서비스 클래스만 남겨보기
2. xml 위치 바꿔보기
3. maven-update
4. server-clean
5. 이클립스 재실행
728x90'Error 해결모음' 카테고리의 다른 글