Example usage for org.springframework.context ConfigurableApplicationContext setId

List of usage examples for org.springframework.context ConfigurableApplicationContext setId

Introduction

In this page you can find the example usage for org.springframework.context ConfigurableApplicationContext setId.

Prototype

void setId(String id);

Source Link

Document

Set the unique id of this application context.

Usage

From source file:org.springframework.cloud.consul.bus.ConsulBusIT.java

private ConfigurableApplicationContext getOutboundContext() {
    System.setProperty("spring.cloud.config.enabled", "false");
    ConfigurableApplicationContext context = new SpringApplicationBuilder().web(false)
            .sources(OutboundConfig.class).run();
    context.setId("testService");
    return context;
}