title: SpringBoot not loading controllers which are generated using OpenAPI 3.0
body: <p>I am generating code using <code>openapi-generator-maven-plugin</code>. The code is getting generated succesfully. But the spring boot is not loading the generated code in the context. I am not sure why, because I have done following things.</p>
  
  <p>Below is my configuration of plugin:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.openapitools&lt;/groupId&gt;
      &lt;artifactId&gt;openapi-generator-maven-plugin&lt;/artifactId&gt;
      &lt;version&gt;4.3.1&lt;/version&gt;
      &lt;executions&gt;
          &lt;execution&gt;
              &lt;goals&gt;
                  &lt;goal&gt;generate&lt;/goal&gt;
              &lt;/goals&gt;
              &lt;configuration&gt;
                  &lt;inputSpec&gt;${project.basedir}/src/main/resources/spec/SchoolAPIs.v1.yaml&lt;/inputSpec&gt;
                  &lt;output&gt;${project.build.directory}/server&lt;/output&gt;
                  &lt;language&gt;spring&lt;/language&gt;
                  &lt;apiPackage&gt;com.school.rest.controllers&lt;/apiPackage&gt;
                  &lt;modelPackage&gt;com.school.rest.generated.dtos&lt;/modelPackage&gt;
                  &lt;supportingFilesToGenerate&gt;ApiUtil.java&lt;/supportingFilesToGenerate&gt;
                  &lt;library&gt;spring-boot&lt;/library&gt;
                  &lt;configOptions&gt;
                      &lt;java8&gt;false&lt;/java8&gt;
                      &lt;dateLibrary&gt;java8&lt;/dateLibrary&gt;
                      &lt;delegatePattern&gt;true&lt;/delegatePattern&gt;
                      &lt;useBeanValidation&gt;true&lt;/useBeanValidation&gt;
                  &lt;/configOptions&gt;
              &lt;/configuration&gt;
          &lt;/execution&gt;
      &lt;/executions&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Below is my main class where I have specified the configuration:</p>
  
  <pre><code>@EnableSwagger2
  @EnableAsync
  @SpringBootApplication(exclude = SecurityAutoConfiguration.class, scanBasePackages = { "com.school.rest"})
  @EnableJpaRepositories(basePackages = "com.school.rest.repository")
  @Slf4j
  public class SchoolAPIApplication implements CommandLineRunner {
  
      public static void main(String[] args) {
          ApplicationContext context = new SpringApplicationBuilder(SchoolAPIApplication.class)
                  .registerShutdownHook(true).run(args);
          PlansApiController plansApiController = context.getBean(PlansApiController.class);
          log.info("&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; {}", plansApiController);
      }
  
  }
  </code></pre>
  
  <p>I am not sure what is going wrong here, been struggling with this for almost 2 days. Can't figure out what is missing.</p>
  
  <p>Please let me know if you have any solutions available.</p>
  
  <p>Update: This call results in following error> </p>
  
  <pre><code>log.info("&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt;&gt; {}", plansApiController);
  </code></pre>
  
  <p>Error:</p>
  
  <pre><code>Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type...
  </code></pre>
  
  <p>Regards</p>