Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'XXX' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
报错之前是这样写的

@Service 注解写在 service 实现类上就成功运行了
