Search in sources :

Example 51 with SpringApplication

use of org.springframework.boot.SpringApplication in project spring-boot-admin by codecentric.

the class ClientReactiveApplicationTest method setUp.

@BeforeEach
@Override
public void setUp() throws Exception {
    super.setUp();
    SpringApplication application = new SpringApplication(TestClientApplication.class);
    application.setWebApplicationType(WebApplicationType.REACTIVE);
    instance = application.run("--spring.application.name=Test-Client", "--server.port=0", "--management.endpoints.web.base-path=/mgmt", "--endpoints.health.enabled=true", "--spring.boot.admin.client.url=" + wireMock.url("/"));
}
Also used : SpringApplication(org.springframework.boot.SpringApplication) BeforeEach(org.junit.jupiter.api.BeforeEach)

Example 52 with SpringApplication

use of org.springframework.boot.SpringApplication in project goci by EBISPOT.

the class ValidatorApplication method main.

public static void main(String... args) {
    System.out.println("Starting association validator service...");
    SpringApplication app = new SpringApplication(ValidatorApplication.class);
    app.setBannerMode(Banner.Mode.OFF);
    app.setLogStartupInfo(false);
    app.run(args);
    System.exit(exitCode);
}
Also used : SpringApplication(org.springframework.boot.SpringApplication)

Example 53 with SpringApplication

use of org.springframework.boot.SpringApplication in project goci by EBISPOT.

the class MappingApplication method main.

public static void main(String... args) {
    String filename = "gwas_mapper.night.";
    System.setProperty("logfilename", filename);
    System.out.println("Starting mapping service...");
    SpringApplicationBuilder builder = new SpringApplicationBuilder(MappingApplication.class);
    SpringApplication app = builder.web(false).addCommandLineProperties(true).build(args);
    ApplicationContext ctx = app.run(args);
    System.out.println("Application executed successfully!");
    int code = app.exit(ctx);
    if (code > 0) {
        System.exit(code);
    }
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) SpringApplication(org.springframework.boot.SpringApplication) SpringApplicationBuilder(org.springframework.boot.builder.SpringApplicationBuilder)

Example 54 with SpringApplication

use of org.springframework.boot.SpringApplication in project goci by EBISPOT.

the class DiagramGenerator method main.

public static void main(String[] args) {
    System.out.println("Starting diagram generator...");
    SpringApplicationBuilder builder = new SpringApplicationBuilder(DiagramGenerator.class);
    SpringApplication app = builder.web(false).addCommandLineProperties(true).build(args);
    ApplicationContext ctx = app.run(args);
    System.out.println("Application executed successfully!");
}
Also used : ApplicationContext(org.springframework.context.ApplicationContext) SpringApplication(org.springframework.boot.SpringApplication) SpringApplicationBuilder(org.springframework.boot.builder.SpringApplicationBuilder)

Example 55 with SpringApplication

use of org.springframework.boot.SpringApplication in project pinpoint by naver.

the class BasicStarter method start.

public void start(String[] args) {
    SpringApplicationBuilder builder = new SpringApplicationBuilder();
    builder.sources(sources);
    builder.web(WebApplicationType.SERVLET);
    builder.bannerMode(Banner.Mode.OFF);
    builder.listeners(new ProfileResolveListener());
    builder.listeners(new EnvironmentLoggingListener());
    builder.listeners(new ExternalEnvironmentListener(externalPropertySourceName, externalConfigurationKey));
    builder.listeners(new PinpointSpringBanner());
    SpringApplication springApplication = builder.build();
    springApplication.run(args);
}
Also used : ExternalEnvironmentListener(com.navercorp.pinpoint.common.server.env.ExternalEnvironmentListener) SpringApplication(org.springframework.boot.SpringApplication) SpringApplicationBuilder(org.springframework.boot.builder.SpringApplicationBuilder) EnvironmentLoggingListener(com.navercorp.pinpoint.common.server.env.EnvironmentLoggingListener) ProfileResolveListener(com.navercorp.pinpoint.common.server.env.ProfileResolveListener) PinpointSpringBanner(com.navercorp.pinpoint.common.server.banner.PinpointSpringBanner)

Aggregations

SpringApplication (org.springframework.boot.SpringApplication)205 ConfigurableApplicationContext (org.springframework.context.ConfigurableApplicationContext)56 Test (org.junit.Test)43 Test (org.junit.jupiter.api.Test)39 Environment (org.springframework.core.env.Environment)21 ConfigurableEnvironment (org.springframework.core.env.ConfigurableEnvironment)15 HashMap (java.util.HashMap)9 ApplicationFailedEvent (org.springframework.boot.context.event.ApplicationFailedEvent)9 ApplicationReadyEvent (org.springframework.boot.context.event.ApplicationReadyEvent)9 ApplicationStartingEvent (org.springframework.boot.context.event.ApplicationStartingEvent)9 File (java.io.File)7 SpringApplicationBuilder (org.springframework.boot.builder.SpringApplicationBuilder)7 BeforeEach (org.junit.jupiter.api.BeforeEach)6 JavaLoggingSystem (org.springframework.boot.logging.java.JavaLoggingSystem)6 ApplicationContext (org.springframework.context.ApplicationContext)6 ApplicationPreparedEvent (org.springframework.boot.context.event.ApplicationPreparedEvent)5 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)5 Assertions.catchThrowable (org.assertj.core.api.Assertions.catchThrowable)4 JoranException (ch.qos.logback.core.joran.spi.JoranException)3 IOException (java.io.IOException)3