Example usage for org.springframework.boot SpringApplication setLogStartupInfo

List of usage examples for org.springframework.boot SpringApplication setLogStartupInfo

Introduction

In this page you can find the example usage for org.springframework.boot SpringApplication setLogStartupInfo.

Prototype

public void setLogStartupInfo(boolean logStartupInfo) 

Source Link

Document

Sets if the application information should be logged when the application starts.

Usage

From source file:runtheshow.resource.boot.Boot.java

public static void main(String[] args) {
    SpringApplication app = new SpringApplication(AppConfiguration.class);
    app.setLogStartupInfo(false);
    // on la lance
    ConfigurableApplicationContext context = app.run(args);
}

From source file:com.webproject.checkpoint.AccessPoint.java

public static void main(String[] args) {
    SpringApplication application = new SpringApplication(AccessPoint.class);
    application.setBannerMode(Banner.Mode.OFF);
    application.setLogStartupInfo(false);
    application.run(args);// w w  w.ja va 2 s .  c  o m
}

From source file:com.ewerk.prototype.PrototypeApplication.java

public static void main(String[] args) {
    final ApplicationPidFileWriter pidFileWriter = new ApplicationPidFileWriter();
    pidFileWriter.setTriggerEventType(ApplicationEnvironmentPreparedEvent.class);

    SpringApplication application = new SpringApplication(PrototypeApplication.class);
    application.setHeadless(true);//from w  w  w .  java2 s .co m
    application.setRegisterShutdownHook(true);
    application.setLogStartupInfo(false);
    application.setWebEnvironment(true);
    application.addListeners(pidFileWriter);
    application.run(args);

    LOG.info("Prototype launched [OK]");
}

From source file:com.ericsson.eiffel.remrem.publish.cli.CLI.java

public static void main(String args[]) {
    SpringApplication application = new SpringApplication(CLI.class);
    application.addInitializers(new SpringLoggingInitializer());
    application.setBannerMode(Banner.Mode.OFF);
    application.setLogStartupInfo(false);
    application.setWebEnvironment(false);
    CliOptions.parse(args);/*from   w w  w .  j av  a  2 s .  co m*/
    application.run(args);
}

From source file:com.ericsson.eiffel.remrem.generate.cli.CLI.java

public static void main(String[] args) throws Exception {
    SpringApplication application = new SpringApplication(CLI.class);
    application.addInitializers(new SpringLoggingInitializer());
    application.setBannerMode(Banner.Mode.OFF);
    application.setLogStartupInfo(false);
    application.setWebEnvironment(false);
    CLIOptions.parse(args);//  w  w w  . j ava2  s.co m
    application.run(args);
}

From source file:org.talend.components.proptester.PropertiesTester.java

public static void main(String[] args) {
    SpringApplication app = new SpringApplication(PropertiesTester.class);
    app.setWebEnvironment(false);//w w  w  . jav a 2  s.  c  om
    app.setShowBanner(false);
    app.setHeadless(true);
    app.setLogStartupInfo(false);
    app.run(args);
    PropertiesTester pt = instance;
    pt.readCommands();
}

From source file:ubicrypt.UbiCrypt.java

@Override
public void start(final Stage stage) throws Exception {
    setUserAgentStylesheet(STYLESHEET_MODENA);
    stage.setTitle("UbiCrypt");
    anchor().setStage(stage);//w w w  . java 2 s .  c o m
    try {
        final PGPKeyPair kp = encryptionKey();
        encrypt(Collections.singletonList(kp.getPublicKey()),
                new ByteArrayInputStream(StringUtils.repeat("ciao", 1).getBytes()));
    } catch (Exception e) {
        Alert alert = new Alert(Alert.AlertType.ERROR);
        alert.setTitle("Strong Encryption Required");
        alert.setHeaderText("Install JCE Unlimited Strength Jurisdiction policy files");
        alert.setContentText(
                "You can install the Java Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files, which are required to use strong encryption.\n"
                        + "Download the files and instructions for Java 8.\n"
                        + "Locate the jre\\lib\\security directory for the Java instance that the UbiCrypt is using.\n"
                        + "For example, this location might be: C:\\Program Files\\Java\\jre8\\lib\\security.\n"
                        + "Replace these two files with the .jar files included in the JCE Unlimited Strength Jurisdiction Policy Files download.\n"
                        + "Stop and restart the UbiCrypt.\n\n\n\n\n\n");
        ButtonType icePage = new ButtonType("Go to JCE download Page");
        alert.getButtonTypes().addAll(icePage);
        Optional<ButtonType> result = alert.showAndWait();
        if (result.get() == icePage) {
            getHostServices().showDocument(
                    "http://www.oracle.com/technetwork/java/javase/downloads/jce8-download-2133166.html");
        }
        Platform.exit();
    }
    final File secFile = securityFile().toFile();
    stage.setScene(anchor().show(secFile.exists() ? "login" : "createKey", getHostServices()));
    stage.show();
    final UbiCrypt ubiCrypt = this;
    anchor().getPasswordStream().subscribeOn(Schedulers.io()).subscribe(pwd -> {
        final SpringApplication app = new SpringApplication(UbiConf.class, PathConf.class, UIConf.class);
        app.setRegisterShutdownHook(false);
        app.addInitializers(new FixPassPhraseInitializer(pwd));
        app.setLogStartupInfo(true);
        ctx = app.run();
        ctx.getAutowireCapableBeanFactory().autowireBean(ubiCrypt);
        ctx.getBeanFactory().registerSingleton("stage", stage);
        ctx.getBeanFactory().registerSingleton("hostService", getHostServices());
        ctx.getBeanFactory().registerSingleton("osUtil", new OSUtil(getHostServices()));
        ControllerFactory cfactory = new ControllerFactory(ctx);
        StackNavigator navigator = new StackNavigator(null, "main", cfactory);
        stage.setScene(new Scene(navigator.open()));
    });

    stage.setOnCloseRequest(windowEvent -> shutdown.run());
    Runtime.getRuntime().addShutdownHook(new Thread(shutdown));
}