title: How to reuse my configurations and exclude another one in SpringBoot Test?
body: <p>How can I reuse my main configurations but exclude some..?</p>
  
  <p>Like:</p>
  
  <pre><code>@SpringBootApplication
  @EnableAutoConfiguration
  public class Application {
  
      public static void main(String[] args) {
          new SpringApplicationBuilder(Application.class, 
                  ConfigOne.class,
                  ConfigTwo.class,
                  ConfigThree.class //I want to exclude the ConfigThree in my tests and use my own ConfigThreeTest.class
                  ).run(args);
      }
  }
  </code></pre>
  
  <hr>
  
  <pre><code>@RunWith(SpringRunner.class)
  @SpringBootTest(webEnvironment = WebEnvironment.RANDOM_PORT)
  public class MyTests {
  
      //test...
  }
  </code></pre>
  
  <hr>
  
  <pre><code>@Configuration
  public class ConfigThreeTest {
  
      //config...
  
  }
  </code></pre>
  
  <p>In the sample above I want to exclude <code>ConfigThree.class</code> and use <code>ConfigThreeTest.class</code></p>