Spring Boot test - overriding bootstrap.properties : <p>We are using bootstrap.properties in a Spring Boot app to configure Spring Cloud Config related properties. </p>

<p>We want to ignore these properties during the testing as we don't want to connect to config server for unit testing. So we are looking for a way to completely undo properties from main <code>bootstrap.properties</code> and provide a new one for testing or override selective properties.</p>

<p>We tried with creating <code>src/test/resources/bootstrap.properties</code>, <code>src/test/resources/bootstrap-test.properties</code> with <code>spring.cloud.config.enabled=false</code> property but it didn't work.</p>

<p>we tried to set as below before starting the TestClass </p>

<pre><code>static {
    System.setProperty("spring.cloud.config.enabled", "false");
}
</code></pre>

<p>and it didn't work.</p>

<p>While Spring Boot documentation is pretty good about how application.properties works, I couldn't find even one reference to <code>bootstrap.properties</code>.</p>

<p>Any help is much appreciated on a reliable way to override <code>bootstrap.properties</code> during testing.</p>
