title: Load test specific properties when run from integration test or default .yml
body: <p>Is it possible to load test specific properties when I run integration test. In this case keyspaceApp: test and when ran normally should load keyspaceApp: abc</p>
  
  <p>.yml file    </p>
  
  <pre><code> defaults: &amp;defaults
      cassandra:
        keyspaceApp: abc
      solr:
        keyspaceApp: xyz
  test:
      cassandra:
       keyspaceApp: test
  </code></pre>
  
  <p>Integration Test </p>
  
  <pre><code>@RunWith(SpringJUnit4ClassRunner.class)
  @SpringApplicationConfiguration(classes = CommonDataApplication.class)
  @IntegrationTest
  @Profile("test")
  public class CassandraClientTest {
  
      @Autowired
      CassandraClientNew cassandraClientNew;
  
      @Test
      public void test(){
          cassandraClientNew.getSession();
          System.out.println(" **** done ****");
      }
  }
  </code></pre>
  
  <p>Main class </p>
  
  <pre><code>@EnableAutoConfiguration
  @ComponentScan
  @PropertySource("classpath:application.yml")
  public class CommonDataApplication {
      public static void main(String[] args) {
          ConfigurableApplicationContext context = new SpringApplicationBuilder(CommonDataApplication.class)
                  .web(false).headless(true).main(CommonDataApplication.class).run(args);
  
      }
  }
  </code></pre>
  
  <p>Bean</p>
  
  <pre><code>@Component
  @ConfigurationProperties(prefix="cassandra")
  public class CassandraClientNew {
  
      private Cluster cluster;
      private Session session;
  
      @Value("${cassandra.keyspaceApp:@null}")
      private String keyspaceApp;
  </code></pre>