티스토리 뷰
[Spring] Context initialization failed org.springframework.beans.factory.BeanCreationException
승가비 2018. 11. 30. 14:01[Spring] Context initialization failed org.springframework.beans.factory.BeanCreationException
Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name '*******': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private ${A} ${B}; nested exception is org.springframework.beans.factory. NoSuchBeanDefinitionException: No qualifying bean of type [***] 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)}
${A}: com.seunggabi.SimpleClass
${B}: com.seunggabi.tistory.SimpleClass
<bean id="SimpleClass" class="com.seunggabi.SimpleClass"/>
<bean id="TistorySimpleClass" class="com.seunggabi.SimpleClass"/>
패키지는 다르지만, 클래스 이름이 중복될 경우 autowired가 되지 않는 경우가 있습니다.
@Autowired
@Qualifier("TistorySimpleClass")
private SimpleClass simpleClass;
이렇게 선언하면 됩니다.
'공부' 카테고리의 다른 글
[Java][JS] startTime <= now <= endTime 현재시간이 맞으면 true (0) | 2018.12.04 |
---|---|
[Git] tag 지우기 (0) | 2018.12.02 |
[JS] 개발환경에 따른 목적 url 생성 (dev, stage, real) (0) | 2018.11.29 |
[MacOs] Charles Debuging (0) | 2018.11.28 |
[Shell] 텍스트 붙이기 (0) | 2018.11.28 |
- Total
- Today
- Yesterday
- 개리마커스
- 레퍼럴
- 테슬라 추천
- 테슬라 레퍼럴 적용 확인
- 모델y
- 테슬라 레퍼럴 코드 확인
- 책그림
- 테슬라 크레딧 사용
- 연애학개론
- 메디파크 내과 전문의 의학박사 김영수
- 테슬라 레퍼럴
- COUNT
- 테슬라 리퍼럴 코드 혜택
- 테슬라 리퍼럴 코드
- Bot
- 테슬라
- 유투브
- 클루지
- 팔로워 수 세기
- 테슬라 리퍼럴 코드 생성
- follower
- Kluge
- 김달
- 어떻게 능력을 보여줄 것인가?
- 모델 Y 레퍼럴
- 할인
- wlw
- 인스타그램
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |