qq_纵横_11
2019-03-15 11:13
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)}
NoSuchBeanDefinitionException: No qualifying bean of type [org.seckill.dao.SeckillDao] found for dependency
容器中没有这个bean,需要在dao加上@Repository
我猜你是在seckillServiceImpl上加了@Autowired注解,如果是这样,你将seckillServiceImpl改为seckillService就可以了
Java高并发秒杀API之web层
66079 学习 · 395 问题
相似问题
回答 1