问答详情
源自:-

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.hzy.spboo.dao.AreaDaoTest': Unsatisfied dependency expressed through field 'areaDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefi

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'com.hzy.spboo.dao.AreaDaoTest': Unsatisfied dependency expressed through field 'areaDao'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'com.hzy.spboo.dao.AreaDao' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}


在对Dao层进行单元测试时,报错了,请问应该如何解决?

提问者:叶隨風 2021-02-13 15:13

个回答