Injection of autowired dependencies failed nested exception is Could not autowire field No qualify

来源:互联网 发布:新歌声网络战队都有谁 编辑:程序博客网 时间:2024/06/05 21:59
Error creating bean with name 'userInfoController': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private cn.xiniu.core.service.basicUser.UserInfoService cn.xiniu.core.controller.UserInfoController.userInfoService; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [cn.xiniu.core.service.basicUser.UserInfoService] 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层的没有写注解(service).加上 就解决了
这里写图片描述

阅读全文
0 1
原创粉丝点击