總是顯示serviceimpl的seckilldao屬性無(wú)法注入
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'seckillServiceImpl': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.seckill.dao.SeckillDao org.seckill.service.impl.SeckillServiceImpl.seckillDao; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.seckill.dao.SeckillDao] 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)}
2019-05-20
NoSuchBeanDefinitionException: No qualifying bean of type [org.seckill.dao.SeckillDao] found for dependency
容器中沒(méi)有這個(gè)bean,需要在dao加上@Repository
2019-03-16
我猜你是在seckillServiceImpl上加了@Autowired注解,如果是這樣,你將seckillServiceImpl改為seckillService就可以了