Merge branch '1.2.x'

This commit is contained in:
Andy Wilkinson 2015-05-11 15:43:58 +01:00
commit 0bcbac6ce7
1 changed files with 2 additions and 0 deletions

View File

@ -67,6 +67,7 @@ import org.springframework.web.context.support.GenericWebApplicationContext;
* *
* @author Dave Syer * @author Dave Syer
* @author Phillip Webb * @author Phillip Webb
* @author Andy Wilkinson
* @see IntegrationTest * @see IntegrationTest
* @see WebIntegrationTest * @see WebIntegrationTest
* @see TestRestTemplate * @see TestRestTemplate
@ -80,6 +81,7 @@ public class SpringApplicationContextLoader extends AbstractContextLoader {
throws Exception { throws Exception {
assertValidAnnotations(config.getTestClass()); assertValidAnnotations(config.getTestClass());
SpringApplication application = getSpringApplication(); SpringApplication application = getSpringApplication();
application.setMainApplicationClass(config.getTestClass());
application.setSources(getSources(config)); application.setSources(getSources(config));
ConfigurableEnvironment environment = new StandardEnvironment(); ConfigurableEnvironment environment = new StandardEnvironment();
if (!ObjectUtils.isEmpty(config.getActiveProfiles())) { if (!ObjectUtils.isEmpty(config.getActiveProfiles())) {