报错内容:org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'taskService': Unsatisfied dependency expressed through field 'taskDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.dhcc.demo.dao.TaskDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
dao层
service层
重点:在引入这个包的时候,记得加上版本号
我这边报错的原因就是因为没加版本号,折腾了我一天。巨坑。