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

问题 :

严重: 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后加 * 星号!!!
这里写图片描述

猜你喜欢

转载自blog.csdn.net/weixin_41847089/article/details/82226037
今日推荐