Package org.springframework.boot.builder

Examples of org.springframework.boot.builder.SpringApplicationBuilder


  <T extends CommonOptions> ContainerBootstrapContext(T options) {

    commandLineListener =
        new CommandLinePropertySourceOverridingListener<T>(options);

    ApplicationContext bootstrapContext = new SpringApplicationBuilder(ContainerBootstrapConfiguration.class,
        options.getClass(),
        PropertyPlaceholderAutoConfiguration.class)
        .listeners(commandLineListener)
        .headless(true)
        .web(false)
View Full Code Here


    CommandLinePropertySourceOverridingListener<AdminOptions> commandLineListener = new CommandLinePropertySourceOverridingListener<AdminOptions>(
        new AdminOptions());

    try {
      this.context = new SpringApplicationBuilder(AdminOptions.class, ParentConfiguration.class)
          .logStartupInfo(false)
          .profiles(XdProfiles.ADMIN_PROFILE)
          .listeners(commandLineListener)
          .initializers(new AdminPortAvailablityInitializer())
          .child(SharedServerContextConfiguration.class, AdminOptions.class)
View Full Code Here

  public static void main(String[] args) {
    new HsqlServerApplication().run(args);
  }

  public void run(String... args) {
    new SpringApplicationBuilder(HsqlDatasourceConfiguration.class)
        .profiles(HSQLDBSERVER_PROFILE)
        .child(HsqlServerApplication.class)
        .web(false)
        .showBanner(false)
        .run(args);
View Full Code Here

  }

  @Before
  public void setUp() throws Exception {
    sharedContext = new SpringApplicationBuilder(SharedConfiguration.class, HsqlDatasourceConfiguration.class,
        HsqlServerApplication.class)
        .profiles(HsqlServerApplication.HSQLDBSERVER_PROFILE)
        .web(false).run();
    messageBus = sharedContext.getBean(LocalMessageBus.class);
    jobPlugin = new JobPlugin(messageBus);
View Full Code Here

      this.logger.info("Root context already created (using as parent).");
      parent = (ApplicationContext) object;
      servletContext.setAttribute(
          WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, null);
    }
    SpringApplicationBuilder application = new SpringApplicationBuilder();
    if (parent != null) {
      application.initializers(new ParentContextApplicationContextInitializer(
          parent));
    }
    application.initializers(new ServletContextApplicationContextInitializer(
        servletContext));
    application.contextClass(AnnotationConfigEmbeddedWebApplicationContext.class);
    application = configure(application);
    // Ensure error pages are registered
    application.sources(ErrorPageFilter.class);
    return (WebApplicationContext) application.run();
  }
View Full Code Here

  public String foo() {
    throw new RuntimeException("Expected exception in controller");
  }

  public static void main(String[] args) throws Exception {
    new SpringApplicationBuilder(SampleWebSecureApplication.class).run(args);
  }
View Full Code Here

  public String foo() {
    throw new RuntimeException("Expected exception in controller");
  }

  public static void main(String[] args) throws Exception {
    new SpringApplicationBuilder(SampleWebSecureCustomApplication.class).run(args);
  }
View Full Code Here

        "com.sun.jersey;sample.jersey1");
    return bean;
  }

  public static void main(String[] args) {
    new SpringApplicationBuilder(SampleJersey1Application.class).web(true).run(args);
  }
View Full Code Here

  public String foo() {
    throw new RuntimeException("Expected exception in controller");
  }

  public static void main(String[] args) throws Exception {
    new SpringApplicationBuilder(SampleWebSecureCustomApplication.class).run(args);
  }
View Full Code Here

    }

  }

  public static void main(String[] args) throws Exception {
    new SpringApplicationBuilder(SampleMethodSecurityApplication.class).run(args);
  }
View Full Code Here

TOP

Related Classes of org.springframework.boot.builder.SpringApplicationBuilder

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.