“NoSuchBeanDefinitionException: No qualifying bean of type”问题解决
2018-01-23 14:57
691 查看
问题:
在一个类中使用注解@Autowired引用一个接口,报错误” NoSuchBeanDefinitionException: No qualifying bean of type”。
原因:
该接口对应的实现类没有任何注解,加上@Component或@Service注解后,该问题解决。
在一个类中使用注解@Autowired引用一个接口,报错误” NoSuchBeanDefinitionException: No qualifying bean of type”。
原因:
该接口对应的实现类没有任何注解,加上@Component或@Service注解后,该问题解决。
相关文章推荐
- shiro错误 org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.cui
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.lin
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [cn.itca
- NoSuchBeanDefinitionException:No qualifying bean of type 解决方法
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.act
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.oskyhang.gbd.service.UserService] found for dependency: expected at least 1 bean which qualifies as aut
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.wei
- Bean对象注入失败 .NoSuchBeanDefinitionException: No qualifying bean of type..
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.wan
- Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [
- springmvc注入类 NoUniqueBeanDefinitionException: No qualifying bean of type [] is defined: expected single错误
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [org.hiber
- NoSuchBeanDefinitionException: No qualifying bean of type
- Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [
- NoSuchBeanDefinitionException: No qualifying bean of type ..
- Spring4.14 事务异常 NoUniqueBeanDefinitionException: No qualifying bean of type [....PlatformTransactionManager]
- org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type [com.serv
- spring 框架错误 org.springframework.beans.factory.NoSuchBeanDefinitionException: No matching bean of type