title: Spring Boot JUnit and @TestPropertySource using multiple property files
body: <p>Spring Boot 2.0.3.RELEASE</p>
  
  <p>Have more than one properties file to deal with .. the application.properties and application-DEV.properties</p>
  
  <p>using the annotation @TestPropertySource in a Junit test I can only get it to read one file:</p>
  
  <pre><code>@TestPropertySource("file:C:\\Users\\user\\eclipse-workspace\\one2one_httpCall\\src\\main\\resources\\application-DEV.properties")
  </code></pre>
  
  <p>works as expected</p>
  
  <p>However I need two properties file I did see the locations option but did not see an example of more than one file .. tried different options but none worked:</p>
  
  <pre><code>@TestPropertySource(locations = "classpath:application-DEV.properties;classpath:application.properties")
  </code></pre>
  
  <p>Tried a couple of ways I am not posting and even tried using @TestPropertySource twice but error saying u cannot use it twice.</p>
  
  <p>tried using @PropertySource since u can use it twice but did not work since this is a Junit test. Looked at a bunch of questions on stacktrace + others and tried but no luck.</p>
  
  <p>So my question is how to use two properties files via the @TestPropertySource annotation?</p>