Skip to content

Instantly share code, notes, and snippets.

@sjyun
Created January 5, 2018 09:52
Show Gist options
  • Save sjyun/f8ae6aa3e29d1af0f1d30e8cf046cd63 to your computer and use it in GitHub Desktop.
Save sjyun/f8ae6aa3e29d1af0f1d30e8cf046cd63 to your computer and use it in GitHub Desktop.
AutoPackageTest
@EnableAutoConfiguration
public class AutoPackageTest {
@Test
public void checkAutoPackage(){
SpringApplication app =
new SpringApplication(AutoPackageTest.class);
app.setBannerMode(Banner.Mode.OFF);
app.setLogStartupInfo(false);
String[] args = {"--debug"};
ConfigurableApplicationContext c = app.run(args);
List<String> packages = AutoConfigurationPackages.get(c);
System.out.println("packages: "+packages);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment