title: NoSuchBeanDefinitionException: No qualifying bean of type available: expected at least 1 bean which qualifies as autowire candidate
body: <p>I am trying to migrate a Spring 4.x.x to Spring boot and it has a dependency on a class in external spring 2.5 jar. I have made all the autowiring changes and below is my application class</p>
  
  <pre><code>@SpringBootApplication
  @EnableAutoConfiguration
  @ComponentScan(basePackages = { "com.xyz" })
  public class MainApiApplication {
  
      public static void main(String[] args) {
          SpringApplication.run(MainApiApplication.class, args);
      }
  }
  </code></pre>
  
  <p>The dependent class in the external jar is present under the package com.xyz.abc because of which I have placed my main application class under com.xyz package and also added the component scan under the same package</p>
  
  <p>Here are my component classes with the dependency autowired</p>
  
  <pre><code>@Component
  public class ComponentClassA {
      @Autowired
      private ComponentClassB currencyService;
  }
  
  @Component
  public class ComponentClassB {
  
      @Autowired
      private DependentClass depClass;
  }
  </code></pre>
  
  <p>DependentClass is the class present in the external dependent jar which I have locally attached and built</p>
  
  <p>When building the application, compilation of all files is fine and build is generated successfully. But when I start the application, I get the below error</p>
  
  <pre><code> Field DependentClass in com.xyz.ComponentClassB required a bean of type 'com.xyz.common.util.DependentClass' that could not be found.
  </code></pre>
  
  <p>I don't understand the reason for the class from external jar being not found as I have added component scan for the package </p>
  
  <p>The definition of DependentClass is like below</p>
  
  <pre><code>public class DependentClass extends ResourceClass&lt;Map&lt;String, Double&gt;&gt; {
              // Methods and logic
  }
  </code></pre>
  
  <p>Is it because DependentClass is extending a class ? Can someone help me figure out the reason for the error ?</p>