努力学习有糖吃
2017-07-08 20:35
为什么提示注解失败
代码如下:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testComponent': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.testBean.InjectionDAO com.testBean.TestComponent.injectionDAO; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.testBean.InjectionDAO] 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)}
已解决。。。
Spring入门篇
268787 学习 · 963 问题
相似问题