類中GirlProperties類中增加了@Component,但還是報(bào)錯(cuò)?
Error creating bean with name 'helloController':
?Unsatisfied dependency expressed through field 'girlProperties':?
No qualifying bean of type [com.imooc.GirlProperties] found for dependency [com.imooc.GirlProperties]:?
expected at least 1 bean which qualifies as autowire candidate for this dependency.?
Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)};
?nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException:
?No qualifying bean of type [com.imooc.GirlProperties] found for dependency [com.imooc.GirlProperties]: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2017-11-03
HelloController類中最前面的注解錯(cuò)了,應(yīng)該死@RestController
2017-11-03
具體的代碼

2017-11-03
@Component注解已經(jīng)寫到了類上
2017-11-02
沒有要找到要注入的Bean
創(chuàng)建helloContoller 的時(shí)候注入 GrilProperties 時(shí)失敗了。
檢查@Component注解是否寫到了類上