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).加上 就解决了
这里写图片描述

posted on 2017-08-03 17:11  2637282556  阅读(148)  评论(0编辑  收藏  举报