——————————————————————————————————————————
Unsatisfied dependency expressed through field 'deptService'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'cn.adomain.service.DeptService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)
——————————————————————————————————————————
The injection point has the following annotations:
- @org.springframework.beans.factory.annotation.Autowired(required=true)
- @org.springframework.beans.factory.annotation.Qualifier(value=XXXService)
——————————————————————————————————————————
——————————————————————————————————————————
解决方案:- 在启动类添加
@ComponentScan(basePackages = {"xxx.xxx.xxx"})
—— 路径是出现报错的service层



