title: Is it possible to exclude nested configuration from autoconfiguration in Spring Boot application?
body: <p>Suppose we have a Spring Boot application and autoconfiguration with several configurations defined inside it</p>
  
  <pre><code>@Configuration
  @AutoConfigureBefore(MainAutoConfiguration.class)
  public class TestAutoConfiguration {
  
      ....
  
      @Configuration
      public static class FirstNestedConfiguration {
          ...
      }
  
      @Configuration
      public static class SecondNestedConfiguration {
          ...
      }
  }
  
  </code></pre>
  
  <p>this class is providing via external library dependency and all conditions are satisfied, so all beans in these configurations are loading.</p>
  
  <p>Nevertheless, I need to exclude beans provided in <code>FirstNestedConfiguration</code>
  Is it possible to do it?</p>
  
  <p>UPD: as it's simple Spring Boot application, it runs as</p>
  
  <pre><code>@SpringCloudApplication
  public class DemoApplication {
      public static void main(String[] args) {
          SpringApplication.run(DemoApplication.class, args);
      }
  }
  </code></pre>
  
  <p>without any explicit @ComponentScan configuration</p>