use of org.springframework.boot.builder.SpringApplicationBuilder in project cas by apereo.
the class CasWebApplication method main.
/**
* Main entry point of the CAS web application.
*
* @param args the args
*/
public static void main(final String[] args) {
final Map<String, Object> properties = CasEmbeddedContainerUtils.getRuntimeProperties(Boolean.TRUE);
final Banner banner = CasEmbeddedContainerUtils.getCasBannerInstance();
new SpringApplicationBuilder(CasWebApplication.class).banner(banner).properties(properties).logStartupInfo(true).run(args);
}
use of org.springframework.boot.builder.SpringApplicationBuilder in project ratpack by ratpack.
the class Spring method spring.
/**
* Creates a registry backed by the given Spring Boot application class.
*
* @param clazz a Spring Boot application class
* @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);
}
use of org.springframework.boot.builder.SpringApplicationBuilder in project spring-boot by spring-projects.
the class SpringApplicationHierarchyTests method testParent.
@Test
public void testParent() {
SpringApplicationBuilder builder = new SpringApplicationBuilder(Child.class);
builder.properties("flyway.enabled=false", "liquibase.enabled=false");
builder.parent(Parent.class);
this.context = builder.run("--server.port=0");
}
use of org.springframework.boot.builder.SpringApplicationBuilder in project spring-boot by spring-projects.
the class SpringApplicationHierarchyTests method testChild.
@Test
public void testChild() {
SpringApplicationBuilder builder = new SpringApplicationBuilder(Parent.class);
builder.properties("flyway.enabled=false", "liquibase.enabled=false");
builder.child(Child.class);
this.context = builder.run("--server.port=0");
}
use of org.springframework.boot.builder.SpringApplicationBuilder in project spring-boot by spring-projects.
the class SampleWebSocketsApplicationTests method reverseEndpoint.
@Test
public void reverseEndpoint() throws Exception {
ConfigurableApplicationContext context = new SpringApplicationBuilder(ClientConfiguration.class, PropertyPlaceholderAutoConfiguration.class).properties("websocket.uri:ws://localhost:" + this.port + "/reverse").run("--spring.main.web_environment=false");
long count = context.getBean(ClientConfiguration.class).latch.getCount();
AtomicReference<String> messagePayloadReference = context.getBean(ClientConfiguration.class).messagePayload;
context.close();
assertThat(count).isEqualTo(0);
assertThat(messagePayloadReference.get()).isEqualTo("Reversed: !dlrow olleH");
}
Aggregations