@org.springframework.beans.factory.annotation.Autowired(required=true)
2017-03-05 21:16
761 查看
今天@Autowired注解无法注入的问题,查了一下情况可能有几种
1.没有配置包扫描,添加如下配置
2.需要注入的类写错了
3.就是我今天这种情况,dubbo忘记添加提供者的接口了。在配置文件中添加如下
1.没有配置包扫描,添加如下配置
<context:component-scan base-package="com.chaoge.controller"/> <context:component-scan base-package="com.chaoge.service"/>
2.需要注入的类写错了
3.就是我今天这种情况,dubbo忘记添加提供者的接口了。在配置文件中添加如下
<dubbo:reference interface="com.dlnu.barter.service.user.api.BarterUserService" id="barterUserService" check="false"/>
相关文章推荐
- @org.springframework.beans.factory.annotation.Autowired(required=true)
- Spring异常: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
- @org.springframework.beans.factory.annotation.Autowired(required=true)
- Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)
- mapper注入失败问题解决 {@org.springframework.beans.factory.annotation.Autowired(required=true)}
- Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
- Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
- SSM整合单元测试出错@org.springframework.beans.factory.annotation.Autowired(required=true)}
- {@org.springframework.beans.factory.annotation.Autowired(required=true)}
- bug解决_{@org.springframework.beans.factory.annotation.Autowired(required=true)}
- @org.springframework.beans.factory.annotation.Autowired(required=true)
- springmcv 整合shiro报{@org.springframework.beans.factory.annotation.Autowired(required=true)}
- 报错:Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
- 异常:org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor
- beans.factory.BeanCreationException beans.factory.annotation.Autowired(required=true)
- Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.Be
- beans.factory.BeanCreationException beans.factory.annotation.Autowired(required=true)
- 运用spring时出现org.springframework.beans.factory.BeanNotOfRequiredTypeException: 错误
- java.lang.NoSuchMethodError: org.springframework.beans.factory.annotation.InjectionMetadata.<init>(L