當前位置: 首頁>>代碼示例>>Java>>正文


Java SpringApplication.setBannerMode方法代碼示例

本文整理匯總了Java中org.springframework.boot.SpringApplication.setBannerMode方法的典型用法代碼示例。如果您正苦於以下問題:Java SpringApplication.setBannerMode方法的具體用法?Java SpringApplication.setBannerMode怎麽用?Java SpringApplication.setBannerMode使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在org.springframework.boot.SpringApplication的用法示例。


在下文中一共展示了SpringApplication.setBannerMode方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: main

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(final String[] args) {

        System.setProperty("vertx.disableDnsResolver", "true");
        System.setProperty("vertx.logger-delegate-factory-class-name", "io.vertx.core.logging.SLF4JLogDelegateFactory");

        final File logbackFile = new File("logback.xml");
        if (logbackFile.exists()) {
            System.setProperty("logging.config", logbackFile.getAbsolutePath());
        }

        final SpringApplication application = new SpringApplication(GatewayMS.class);
        application.setBannerMode(Mode.OFF);
        application.setWebEnvironment(false);
        application.run(args);

    }
 
開發者ID:trajano,項目名稱:app-ms,代碼行數:17,代碼來源:GatewayMS.java

示例2: main

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
    SpringApplication app = new SpringApplication(Application.class);
    app.setBannerMode(Banner.Mode.OFF);
    app.setLogStartupInfo(false);
    app.setRegisterShutdownHook(false);
    Map<String, Object> pro = Maps.newHashMap();
    pro.put("logging.level.root", "ERROR");

    app.setDefaultProperties(pro);
    app.run(args);
}
 
開發者ID:mayabot,項目名稱:mynlp,代碼行數:12,代碼來源:Application.java

示例3: run

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
protected static void run(Class cls, String[] args)
{
    SpringHolder.setArgs(args);
    Q2Mods.patchQ2();

    System.setProperty("spring.config.location", "file:cfg/");
    SpringApplication app = new SpringApplication(JPosApplication.class, cls);
    app.setBannerMode(Mode.OFF);
    app.run(args);
}
 
開發者ID:vmantek,項目名稱:chimera,代碼行數:11,代碼來源:JPosApplication.java

示例4: registerAndRefresh

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
protected void registerAndRefresh(String[] args, Class<?>... annotatedClasses) {
    String[] nullSafeArgs = args == null ? EMPTY_ARGS : Stream.of(args).map(arg -> "--" + arg).toArray(String[]::new);

    assertTrue("Context parameters must use '=' to separate name and value: " + Arrays.toString(args),
        Stream.of(nullSafeArgs).allMatch(arg -> arg.indexOf('=') > 0)
    );

    SpringApplication app = new SpringApplication((Object[])annotatedClasses);
    app.setBannerMode(Banner.Mode.OFF);

    ctx = app.run(nullSafeArgs);

    allCtx.add(ctx);
}
 
開發者ID:hekate-io,項目名稱:hekate,代碼行數:15,代碼來源:HekateAutoConfigurerTestBase.java

示例5: run

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
/**
 * Bootstrap the microservice application.
 *
 * @param applicationClass
 *            JAX-RS Application class
 * @param extraSources
 *            extra source classes.
 * @param args
 *            command line arguments
 */
public static void run(final Class<? extends Application> applicationClass,
    final Class<?>[] extraSources,
    final String... args) {

    if (!microserviceEngineIterator.hasNext()) {
        throw new LinkageError("No MicroserviceEngine was defined");
    }
    final MicroserviceEngine microserviceEngine = microserviceEngineIterator.next();
    if (microserviceEngineIterator.hasNext()) {
        throw new LinkageError(format("Multiple MicroserviceEngine was defined, %s, %s and possibly more", microserviceEngine, microserviceEngineIterator.next()));
    }
    if (Microservice.applicationClass != null) {
        throw new LinkageError("Another Application class has already been registered in this JVM.");
    }
    Microservice.applicationClass = applicationClass;

    final Object[] bootstrapObjects = microserviceEngine.bootstrap();
    final Object[] sources = new Object[extraSources.length + bootstrapObjects.length];

    System.arraycopy(extraSources, 0, sources, 0, extraSources.length);
    System.arraycopy(bootstrapObjects, 0, sources, extraSources.length, bootstrapObjects.length);

    final SpringApplication springApplication = new SpringApplication(sources);
    springApplication.setWebEnvironment(false);
    springApplication
        .setBannerMode(Mode.OFF);
    springApplication.run(args);
}
 
開發者ID:trajano,項目名稱:app-ms,代碼行數:39,代碼來源:Microservice.java

示例6: main

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String... args) {
    final SpringApplication app = new SpringApplication(MongoMigration.class);
    app.setBannerMode(Banner.Mode.OFF);

    boolean hasError = false;
    try (ConfigurableApplicationContext context = app.run(args)) {
        context.getBean(MongoDbMigrationService.class).runDatabaseMigration();
    } catch (IOException e) {
        hasError = true;
        log.error("Error while running database-migration: {}", e.getMessage(), e);
    }

    if (hasError) System.exit(1);
}
 
開發者ID:redlink-gmbh,項目名稱:smarti,代碼行數:15,代碼來源:MongoMigration.java

示例7: run

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
@Override
public void run(ApplicationArguments args) throws Exception {

    SpringApplication app = new SpringApplication(Lyre.class);
    String[] arguments = RunnerUtils.buildArguments(app.getMainApplicationClass().getAnnotation(EnableLyre.class));
    app.setMainApplicationClass(Lyre.class);
    app.setBannerMode(Banner.Mode.OFF);
    app.run(arguments);
}
 
開發者ID:groovylabs,項目名稱:lyre,代碼行數:10,代碼來源:LyreRunner.java

示例8: main

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
    SpringApplication app = new SpringApplication(MintingApplication.class);
    app.setBannerMode(Banner.Mode.OFF);
    app.setWebEnvironment(false);
    app.run(args);
}
 
開發者ID:modum-io,項目名稱:tokenapp-backend,代碼行數:7,代碼來源:MintingApplication.java

示例9: main

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
    SpringApplication app = new SpringApplication(RatesApplication.class);
    app.setBannerMode(Banner.Mode.OFF);
    app.setWebEnvironment(false);
    app.run(args);
}
 
開發者ID:modum-io,項目名稱:tokenapp-backend,代碼行數:7,代碼來源:RatesApplication.java

示例10: main

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
	SpringApplication springApplication = new SpringApplication(SpringBootDemoApplication.class);
	springApplication.setBannerMode(Banner.Mode.OFF);
	springApplication.run();
}
 
開發者ID:cairenjie1985,項目名稱:springBoot-demo,代碼行數:6,代碼來源:SpringBootDemoApplication.java

示例11: main

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
	SpringApplication app=new SpringApplication(CcSApplication.class);
	app.setBannerMode(Banner.Mode.OFF);//關閉banner
	app.run(args);
}
 
開發者ID:myopenresources,項目名稱:cc-s,代碼行數:6,代碼來源:CcSApplication.java

示例12: main

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
    	SpringApplication app = new SpringApplication(ScouterPulseApplication.class);
    	app.setBannerMode(Mode.OFF);
    	app.run(args);
}
 
開發者ID:nices96,項目名稱:scouter-pulse-aws-monitor,代碼行數:6,代碼來源:ScouterPulseApplication.java

示例13: main

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
    SpringApplication application = new SpringApplication(IlyaApplication.class);
    application.setBannerMode(Banner.Mode.OFF);
    application.run(args);
}
 
開發者ID:izaharkin,項目名稱:JavaRestCalculator,代碼行數:6,代碼來源:IlyaApplication.java

示例14: main

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
    SpringApplication app = new SpringApplication(Application.class);

    app.setBannerMode(Banner.Mode.OFF);
    app.run(args);
}
 
開發者ID:luoxn28,項目名稱:redis-info,代碼行數:7,代碼來源:Application.java

示例15: main

import org.springframework.boot.SpringApplication; //導入方法依賴的package包/類
public static void main(String[] args) {
    SpringApplication app = new SpringApplication(CrowDemon.class);
    app.setBannerMode(Banner.Mode.OFF);
    app.setWebEnvironment(false);
    app.run(args);
}
 
開發者ID:blacklabelops,項目名稱:crow,代碼行數:7,代碼來源:CrowDemon.java


注:本文中的org.springframework.boot.SpringApplication.setBannerMode方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。