2 qq 18630255 qq_18630255 于 2016.03.12 10:17 提问

Spring注入问题 框架是ssm+中间件+Zookeeper

错误日志
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'weipumallHappyPayController': Injection of resource dependencies failed; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [net.viservice.service.weipu.MemberCardService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER)}
.........
Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [net.viservice.service.weipu.MemberCardService] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@javax.annotation.Resource(shareable=true, mappedName=, description=, name=, type=class java.lang.Object, authenticationType=CONTAINER)}

2个回答

qq_30408111
qq_30408111   2016.03.12 16:55

没代码不好弄啊,不过可以看出是bean 'weipumallHappyPayController没有创建成功,主要原因应该在No qualifying bean of type [net.viservice.service.weipu.MemberCardService] found for dependency这一点,在好好看看,也可以把你的代码贴出来。

wangkang80
wangkang80   2016.03.14 10:37

关于ssm的完整配置,可参考:http://git.oschina.net/wangkang/llsfw

希望能够帮到你

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!