记录A component required a bean named 'studentService' that could not be found.
2017-12-19 10:48
866 查看
报错如题: A component required a bean named 'studentService' that could not be found.
出问题的代码行:
<dubbo:service layer="biz" interface="com.service.rpc.api.StudentService" ref="studentService" protocol="dubbo" group="xmlConfig"/>
出错的地方:
ref="studentService"
出错原因:报错时在service实现类上注解写的是
@Service("StudentService")
@Service("StudentService") public class StudentServiceImpl implements StudentService {
如上代码和 dubbo 引用时名字不一致,一个是大写,一个是小写。导入无法引用到。
改为统一名字就行了。
相关文章推荐
- 解决 A component required a bean of 'XXX.RoleService' that could not be found.
- required a bean of type 'org.hibernate.SessionFactory' that could not be found.
- springcloud-3:required a bean of type 'com.netflix.discovery.DiscoveryClient' that could not be found.
- required a bean of type 'org.hibernate.SessionFactory' that could not be found.
- Field XXX in XXXX required a bean of type XXXX that could not be found.
- mybatis Field xxxMapper in xxxx required a bean of type 'XXXMapper' that could not be found.
- com.sun.xml.internal.ws.model.RuntimeModelerException: class:com.mark.cxf.service could not be found
- "cabal: ar is required but it could not be found"
- 在线安装maven插件问题:Cannot complete the install because one or more required items could not be found.
- 安装ADT Cannot complete the install because one or more required items could not be found.
- Cannot complete the install because one or more required items could not be found
- Cannot complete the install because one or more required items could not be found
- maven--Cannot complete the install because one or more required items could not be found
- Could not instantiate bean class [com.bjsxt.service.UserService]: No default constructor found;
- 安装11.2.0.3时,OUI的log报错:"OUI-10066:Not All The Dependencies For The Component ... Could Be Found"
- Cannot complete the install because one or more required items could not be found
- 在线安装maven插件问题:Cannot complete the install because one or more required items could not be found.
- An EJB Exception:The user-provided class "XXXX" needed by the EnterpriseBean could not be found or loaded.
- 安装maven的eclipse插件出现Cannot complete the install because one or more required items could not be found
- 在线安装maven插件问题:Cannot complete the install because one or more required items could not be found.