Package org.springframework.boot.builder

Examples of org.springframework.boot.builder.SpringApplicationBuilder


    assertTrue(latch.await(10, TimeUnit.SECONDS));
  }

  @Test
  public void shutdownParent() throws Exception {
    this.context = new SpringApplicationBuilder(Empty.class).child(Config.class)
        .web(false).run();
    CountDownLatch latch = this.context.getBean(Config.class).latch;
    assertThat((String) getEndpointBean().invoke().get("message"),
        startsWith("Shutting down"));
    assertTrue(this.context.isActive());
View Full Code Here


    ApplicationContextTestUtils.closeAll(this.context);
  }

  @Test
  public void testParent() {
    SpringApplicationBuilder builder = new SpringApplicationBuilder(Child.class);
    builder.parent(Parent.class);
    this.context = builder.run("--server.port=0");
  }
View Full Code Here

    this.context = builder.run("--server.port=0");
  }

  @Test
  public void testChild() {
    this.context = new SpringApplicationBuilder(Parent.class).child(Child.class).run(
        "--server.port=0");
  }
View Full Code Here

    private ConfigurableApplicationContext parent;

    // Context factory method

    public ConfigurableApplicationContext run(String... args) {
        SpringApplicationBuilder applicationBuilder = new SpringApplicationBuilder().
                sources(FabricSpringApplicationConfiguration.class);
        if (parent != null) {
            applicationBuilder.parent(parent);
        }
        return applicationBuilder.run(args);
    }
View Full Code Here

   * @param args any arguments to pass to the application
   * @return a registry that retrieves objects from the given application's bean factory
   * @see #spring(org.springframework.beans.factory.ListableBeanFactory)
   */
  public static Registry spring(Class<?> clazz, String... args) {
    SpringApplicationBuilder springApplicationBuilder = new SpringApplicationBuilder(clazz);
    springApplicationBuilder.main(clazz);
    return spring(springApplicationBuilder, 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.