网上下载的源码,项目启动报错,求原因。

来源:4-1 ——第四章知识点概览

CarlosLiu

2017-12-03

 org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'portalServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.online.college.core.consts.service.IConstsClassifyService com.online.college.portal.business.impl.PortalServiceImpl.constsClassifyService; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'constsClassifyServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private com.online.college.core.consts.dao.ConstsClassifyDao com.online.college.core.consts.service.impl.ConstsClassifyServiceImpl.entityDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [com.online.college.core.consts.dao.ConstsClassifyDao] 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)}



写回答

1回答

祁聪

2017-12-04

应该是spring注入的错误,看一下 portalServiceImpl 中的 ConstsClassifyDao 是不是加了注解?

0
4
祁聪
回复
殢无伤0
好的,我qq 309952077 ,或者群里找我也行
2018-01-23
共4条回复

Java SSM快速开发仿慕课网在线教育平台

学习整合微信公众平台开发、新浪SAE云平台、七牛云、分布式部署等等

1074 学习 · 449 问题

查看课程