Java Code Examples for org.springframework.boot.builder.SpringApplicationBuilder#bannerMode()

The following examples show how to use org.springframework.boot.builder.SpringApplicationBuilder#bannerMode() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: AbstractCfEnvTests.java    From java-cfenv with Apache License 2.0 5 votes vote down vote up
public Environment getEnvironment(Map<String, Object> properties) {
	SpringApplicationBuilder builder = new SpringApplicationBuilder(TestApp.class)
		.web(WebApplicationType.NONE);
	if (!CollectionUtils.isEmpty(properties)) {
		builder.properties(properties);
	}
	builder.bannerMode(Banner.Mode.OFF);
	ApplicationContext applicationContext = builder.run();
	Environment environment = applicationContext.getEnvironment();
	((ConfigurableApplicationContext) applicationContext).close();
	return environment;
}
 
Example 2
Source File: MongoCfEnvProcessorTests.java    From java-cfenv with Apache License 2.0 5 votes vote down vote up
public Environment getEnvironment() {
	SpringApplicationBuilder builder = new SpringApplicationBuilder(TestApp.class)
			.web(WebApplicationType.NONE);
	builder.bannerMode(Banner.Mode.OFF);
	ApplicationContext applicationContext = builder.run();
	return applicationContext.getEnvironment();
}
 
Example 3
Source File: TestApplication.java    From spring-cloud-config-aws-kms with Apache License 2.0 4 votes vote down vote up
public static void main(final String[] args) {
    final SpringApplicationBuilder app = new SpringApplicationBuilder(TestApplication.class);
    app.bannerMode(OFF);
    app.run(args);
}