springboot报错:expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

springboot Controller中引用

@Autowired
    private IXxxService xxxService;

 报错;expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}

   解决:

XxxServiceImpl 前加 @Service 注解。

posted on 2019-12-16 10:31  七七2020  阅读(6461)  评论(0编辑  收藏  举报

导航