早教吧作业答案频道 -->其他-->
Couldnotautowirefield:privatecom.mvc.service.StudentServicecom.mvc.controller.StudErrorcreatingbeanwithname'studentController':Injectionofautowireddependenciesfailed;nestedexceptionisorg.springframework.beans.factory.BeanCreationExc
题目详情
Could not autowire field:private com.mvc.service.StudentService com.mvc.controller.Stud
Error creating bean with name 'studentController':Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException:Could not autowire method:public void
Could not autowire method:public void com.mvc.controller.StudentController.setStudentService(com.mvc.service.StudentService);
No matching bean of type [com.mvc.service.StudentService] found for dependency:expected at least 1 bean which qualifies as autowire candidate for this dependency.Dependency annotations:{}
Error creating bean with name 'studentController':Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException:Could not autowire method:public void
Could not autowire method:public void com.mvc.controller.StudentController.setStudentService(com.mvc.service.StudentService);
No matching bean of type [com.mvc.service.StudentService] found for dependency:expected at least 1 bean which qualifies as autowire candidate for this dependency.Dependency annotations:{}
▼优质解答
答案和解析
spring 配置文件 的 bean 自动注入失败! 你可以考虑 用 构造器
看了Couldnotautowir...的网友还看了以下:
Couldnotautowirefield:privatecom.mvc.service.Stude 2020-10-31 …