title: Spring Boot cannot autowired component with abstract and interface
body: <p>In my Spring Boot 2.0.2 application I am trying to inject a component herited from abstract class which implements an interface and it doesn't work.</p>
  
  <p>Code :</p>
  
  <p><strong>Component Abstract :</strong> (Do I need to put @Component ?)</p>
  
  <pre><code>package app.project.service;
  
  @Component
  public abstract class AbstractStepService implements IStepService {
  
      protected final void addTask() {
          ...
      }
  
      @Override
      public StepDataDto launch() throws StepException {
          ...
      }
  }
  </code></pre>
  
  <p><strong>Interface :</strong></p>
  
  <pre><code>package app.project.service;
  
  public interface IStepService  {
      StepDataDto launch() throws StepException;
  }
  
  package app.project.service;
  </code></pre>
  
  <p><strong>Component :</strong></p>
  
  <pre><code>@Component
  public class CStepServiceImpl extends AbstractStepService implements IStepService {
  
      @PostConstruct
      private void defineTasks() {
      }
  }
  
  package app.project.service;
  </code></pre>
  
  <p><strong>Junit Test :</strong></p>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest
  public class CStepServiceTest {
  
      @Autowired
      @Qualifier("cStepServiceImpl")
      private IStepService service;
  
  }
  
  package app.project;
  </code></pre>
  
  <p><strong>Application :</strong></p>
  
  <pre><code>@SpringBootApplication
  @ComponentScan(basePackages ={"app.project.service"})
  public class MyApplication {}
  </code></pre>
  
  <p><strong>Error message when launching my Junit test :</strong></p>
  
  <pre><code>Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'app.project.service.IStepService' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true), @org.springframework.beans.factory.annotation.Qualifier(value=cStepServiceImpl)}
  </code></pre>
  
  <p>Any idea ?</p>
  
  <p>Thanks</p>