본문 바로가기
Spring/Problems

No qualifying bean of type ~

by avvin 2019. 8. 19.

[Error] No qualifying bean of type ~



>>빈으로 등록되지 않은 객체를 주입하려할 때 발생하는 에러


Error creating bean with name 'chartController': Unsatisfied dependency expressed through field 'dto'
; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException
: No qualifying bean of type 'com.example.diary.model.chart.dto.ChartDTO' available
: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@javax.inject.Inject()}


bean으로 등록하지 않은 DTO를 주입해서 사용하려고 했다.