안녕하세요 용재형 입니다. 이번 포스팅은 Injection of autowired dependencies failed 입니다.
ERROR: org.springframework.web.servlet.DispatcherServlet - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'boardController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: pay.interpay.board.service.BoardService pay.interpay.board.controller.BoardController.boardService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'boardService': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: pay.interpay.board.dao.BoardDao pay.interpay.board.service.BoardService.boardDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [pay.interpay.board.dao.BoardDao] 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)}
@Autowired 쓸때는 마지막 dao 단까지 잘 쓰자.
import org.springframework.stereotype.Repository;
클래스 위에 @Repository를 꼭 붙여야 함.
'IT > Back-End' 카테고리의 다른 글
오라클에서 특정컬럼 소수점 값있는 데이터 찾기(ex0.1, 0.2) (0) | 2020.09.25 |
---|---|
java에서 .bat파일 args를 쿼츠 잡 파라미터로 넘기는 방법 (0) | 2020.02.18 |
[오라클] 인덱스 힌트 사용방법(Oracle index hint) (0) | 2020.02.13 |
자바 null 체크 (0) | 2018.12.12 |
자바 디스크용량, cpu사용량,메모리 사용량 구하기 (0) | 2018.12.12 |
댓글