title: How to override application-test.yml in spring boot test?
body: <p>I have src/main/test/resources/application-test.yml, as per SpringBootTest it will load application.yml and then loads application-test.yml. But I face a scenario where I want to override certain properties in application-test.yml only for one test but other test needs to use properties from application-test.yml. How would I do this ?</p>
  <p>I tried to use the <code>@TestPropertySource</code> annotation to override but it is not working.</p>
  <pre><code>@Slf4j
  @RunWith(SpringRunner.class)
  @SpringBootTest(classes= MyApplicationTestApplication.class)
  @ActiveProfiles(&quot;test&quot;)
  @DirtiesContext
  @TestPropertySource(locations = {&quot;classpath:application-test.yml&quot;,
                                      &quot;classpath:file-test.properties&quot;})
  </code></pre>