Skip to content

Instantly share code, notes, and snippets.

@michail-nikolaev
Created September 9, 2012 22:31
Show Gist options
  • Save michail-nikolaev/3687706 to your computer and use it in GitHub Desktop.
Save michail-nikolaev/3687706 to your computer and use it in GitHub Desktop.
SpringTestBase - workaround to support profiles
@Configuration
@ComponentScan("com.bla")
public class SpringConfig {
}
@ContextConfiguration(classes = SpringConfig.class)
@ActiveProfiles("test")
@RunWith(SpringJUnit4ClassRunner.class)
public class SpringTestBase {
static {
System.setProperty("spring.profiles.active", "test");
}
@Test
public void junkTest(){}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment