各种解决方法都试过了,还是不行,求大神帮助,配置也是正确的。烦死了

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'merchantController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.ub.alipay.service.MerchantService com.ub.alipay.web.MerchantController.merchantService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.ub.alipay.service.MerchantService] 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)}

![![![![![图片说明](https://img-ask.csdn.net/upload/201611/07/1478488390_479744.png)图片说明](https://img-ask.csdn.net/upload/201611/07/1478488384_526995.png)图片说明](https://img-ask.csdn.net/upload/201611/07/1478488372_186480.png)图片说明](https://img-ask.csdn.net/upload/201611/07/1478488363_645901.png)图片说明](https://img-ask.csdn.net/upload/201611/07/1478488346_944625.png)图片说明

有个注解写错了吧 应该用@Component 而不是@Resource

这样写是没有问题,你上传的文件不全,也看不出来什么问题,可从配置文件检查开始跟,一步一步的检查