Load different application.yml in SpringBoot Test
One option is to work with profiles. Create a file called application-test.yml, move all properties you need for those tests to that file and then add the @ActiveProfiles annotation to your test class: @RunWith(SpringJUnit4ClassRunner.class) @SpringApplicationConfiguration(classes = Application.class) @WebAppConfiguration @IntegrationTest @ActiveProfiles(“test”) // Like this public class MyIntTest{ } Be aware, it will additionally load the application-test.yml, … Read more