您的位置:首页 > 编程语言 > Java开发

ssm+dubb:使用ssm+dubb搭建分布式项目时出现的问题(org.springframework.beans.factory.BeanCreationException)

2018-08-30 18:29 639 查看

问题 :

严重: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘brandServiceImpl’: Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.pyg.mapper.TbBrandMapper com.pyg.sellergoods.service.impl.BrandServiceImpl.brandMapper; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.pyg.mapper.TbBrandMapper] 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)}

出现原因

在service成配置监听器扫描spring配置文件出错

解决办法

在classpath后加 * 星号!!!

阅读更多
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐