Java Code Examples for org.springframework.boot.SpringApplication#setBannerMode()

The following examples show how to use org.springframework.boot.SpringApplication#setBannerMode() . 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: ContainerApplication.java    From tac with MIT License 6 votes vote down vote up
public static void main(String[] args) throws Exception {

        // the code must execute before spring start
        JarFile bootJarFile = BootJarLaucherUtils.getBootJarFile();
        if (bootJarFile != null) {
            BootJarLaucherUtils.unpackBootLibs(bootJarFile);
            log.debug("the temp tac lib folder:{}", BootJarLaucherUtils.getTempUnpackFolder());
        }
        SpringApplication springApplication = new SpringApplication(ContainerApplication.class);

        springApplication.setWebEnvironment(true);
        springApplication.setBannerMode(Banner.Mode.OFF);

        springApplication.addListeners(new ApplicationListener<ApplicationEnvironmentPreparedEvent>() {
            @Override
            public void onApplicationEvent(ApplicationEnvironmentPreparedEvent event) {
                CodeLoadService.changeClassLoader(event.getEnvironment());
            }
        });
        springApplication.run(args);
    }
 
Example 2
Source File: TestMetaServer.java    From x-pipe with Apache License 2.0 5 votes vote down vote up
@Override
public void doStart() throws Exception{
	
	System.setProperty(DefaultDcMetaCache.MEMORY_META_SERVER_DAO_KEY, configFile);
	System.setProperty("TOTAL_SLOTS", String.valueOf(total_slots));
	
	SpringApplication application = new SpringApplication(TestMetaServer.class);
	application.setBannerMode(Mode.OFF);
	application.setEnvironment(createEnvironment());
	
	context = application.run(new String[]{});
	
	TestZkClient client = context.getBean(TestZkClient.class);
	DefaultZkConfig zkConfig = new DefaultZkConfig();
	zkConfig.setZkSessionTimeoutMillis(zkSessionTimeoutMillis);
	client.setZkConfig(zkConfig);
	client.setZkAddress(zkConnectionStr);

	UnitTestServerConfig config = context.getBean(UnitTestServerConfig.class);
	config.setZkAddress(zkConnectionStr);
	config.setMetaServerId(serverId);
	config.setMetaServerPort(serverPort);
	
	ArrangeTaskTrigger arrangeTaskTrigger = context.getBean(ArrangeTaskTrigger.class);
	arrangeTaskTrigger.setWaitForRestartTimeMills(waitForRestartTimeMills);

	manager = context.getBean(SpringComponentRegistry.class);
	manager.initialize();
	manager.start();
}
 
Example 3
Source File: StartApplication.java    From Jantent with MIT License 5 votes vote down vote up
public static void main(String[] args) throws Exception{

        SpringApplication app = new SpringApplication(StartApplication.class);
        app.setBannerMode(Banner.Mode.OFF);
        app.setBannerMode(Banner.Mode.OFF);
        app.run(args);

    }
 
Example 4
Source File: OpenzalySpringBoot.java    From openzaly with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {

		SpringApplication application = new SpringApplication(OpenzalySpringBoot.class);
		application.setBannerMode(Banner.Mode.OFF);
		// application.setDefaultProperties(properties);
		application.run(args);
	}
 
Example 5
Source File: RetryableRestOperationsTest.java    From x-pipe with Apache License 2.0 5 votes vote down vote up
@Before
public void startUp() {
	port = randomPort(8081, 9090);
	targetResponse = randomString();
	System.setProperty("server.port", String.valueOf(port));
	System.setProperty("target-response", targetResponse);
	SpringApplication app = new SpringApplication(SimpleTestSpringServer.class);
	app.setBannerMode(Mode.OFF);
	ctx = app.run("");
	ctx.start();
}
 
Example 6
Source File: NimrodBootstrap.java    From nimrod with MIT License 5 votes vote down vote up
@Override
protected WebApplicationContext run(SpringApplication application) {
    application.setBannerMode(Banner.Mode.OFF);
    WebApplicationContext webApplicationContext = super.run(application);
    bootstrap(webApplicationContext);
    return webApplicationContext;
}
 
Example 7
Source File: OpenzalySpringBoot.java    From openzaly with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {

		SpringApplication application = new SpringApplication(OpenzalySpringBoot.class);
		application.setBannerMode(Banner.Mode.OFF);
		// application.setDefaultProperties(properties);
		application.run(args);
	}
 
Example 8
Source File: ODataWinServiceContainer.java    From odata with Apache License 2.0 5 votes vote down vote up
/**
 * Starting the service container.
 *
 * @param args startCommand
 */
public static void start(String[] args) {
    LOG.info("Starting Spring Application container");

    SpringApplication springApplication = new SpringApplication(ODataServiceContainer.class);
    springApplication.setBannerMode(OFF);
    springApplication.run(args);

    LOG.info("Spring application container started");
}
 
Example 9
Source File: LayuiAdminStartUp.java    From layui-admin with MIT License 5 votes vote down vote up
public static void main(String[] args) {
    SpringApplication app = new SpringApplication(LayuiAdminStartUp.class);
    app.setBannerMode(Banner.Mode.OFF);
    app.setWebApplicationType(WebApplicationType.SERVLET);
    Set<String> sources = new HashSet<String>();
    sources.add("classpath:applicationContext.xml");
    app.setSources(sources);

    app.run(args);
}
 
Example 10
Source File: SpringApplicationStarter.java    From x-pipe with Apache License 2.0 5 votes vote down vote up
public SpringApplicationStarter(Object resource, int port, int maxThreads) {
    application = new SpringApplication(resource);
    application.setBannerMode(Banner.Mode.OFF);
    this.port = port;
    this.maxThreads = maxThreads;
    application.setEnvironment(createEnvironment());
}
 
Example 11
Source File: App.java    From mojito with Apache License 2.0 5 votes vote down vote up
/**
 * Application entry point.
 *
 * @param args
 */
public static void main(String[] args) {
    SpringApplication app = new SpringApplication(App.class);
    app.setBannerMode(Banner.Mode.OFF);
    app.setWebEnvironment(false);
    app.run(args);
}
 
Example 12
Source File: OpenzalySpringBoot.java    From wind-im with Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) {

		SpringApplication application = new SpringApplication(OpenzalySpringBoot.class);
		application.setBannerMode(Banner.Mode.OFF);
		// application.setDefaultProperties(properties);
		application.run(args);
	}
 
Example 13
Source File: Application.java    From consensusj with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) {
    SpringApplication app = new SpringApplication(Application.class);
    app.setBannerMode(Banner.Mode.OFF);
    app.run(args);
}
 
Example 14
Source File: OpenzalyAdminApplication.java    From openzaly with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) {
	SpringApplication application = new SpringApplication(OpenzalyAdminApplication.class);
	application.setBannerMode(Banner.Mode.OFF);
	application.run(args);
}
 
Example 15
Source File: Application.java    From fastdep with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) {
    SpringApplication application = new SpringApplication(Application.class);
    application.setBannerMode(Banner.Mode.OFF);
    application.run(args);
}
 
Example 16
Source File: Application.java    From consensusj with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) {
    SpringApplication app = new SpringApplication(Application.class);
    app.setBannerMode(Banner.Mode.OFF);
    ApplicationContext ctx = app.run(args);
}
 
Example 17
Source File: MyApplication.java    From SpringBoot-Shiro-Vue-master-20180625 with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) {
    SpringApplication application = new SpringApplication(MyApplication.class);
    application.setBannerMode(Banner.Mode.OFF);
    application.run(args);
}
 
Example 18
Source File: Application.java    From consensusj with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) {
    SpringApplication app = new SpringApplication(Application.class);
    app.setBannerMode(Banner.Mode.OFF);
    app.run(args);
}
 
Example 19
Source File: ClientDemoApplication.java    From LicenseDemo with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) {
       SpringApplication application = new SpringApplication(ClientDemoApplication.class);
       application.setBannerMode(Banner.Mode.CONSOLE);
       application.run(args);
}
 
Example 20
Source File: CanalAdminApplication.java    From canal with Apache License 2.0 4 votes vote down vote up
public static void main(String[] args) {
    SpringApplication application = new SpringApplication(CanalAdminApplication.class);
    application.setBannerMode(Banner.Mode.OFF);
    application.run(args);
}