use of org.springframework.boot.builder.SpringApplicationBuilder in project spring-cloud-consul by spring-cloud.
the class ConsulDiscoveryClientAclTests method getInstancesForSecondServiceWorks.
@Test
public void getInstancesForSecondServiceWorks() throws Exception {
new SpringApplicationBuilder(MyTestConfig.class).run("--spring.application.name=testSecondServiceAcl", "--server.port=0", "--spring.cloud.consul.discovery.preferIpAddress=true", "--consul.token=2d2e6b3b-1c82-40ab-8171-54609d8ad304");
List<ServiceInstance> instances = discoveryClient.getInstances("testSecondServiceAcl");
assertNotNull("second service instances was null", instances);
assertFalse("second service instances was empty", instances.isEmpty());
}
use of org.springframework.boot.builder.SpringApplicationBuilder in project x-pipe by ctripcorp.
the class AppTest method start.
private void start() throws Exception {
ConfigurableApplicationContext context = new SpringApplicationBuilder(AppTest.class).run();
initComponentRegistry(context);
waitForAnyKeyToExit();
}
use of org.springframework.boot.builder.SpringApplicationBuilder in project goci by EBISPOT.
the class SolrIndexerApplication method main.
public static void main(String[] args) {
System.out.println("Starting Solr indexing application...");
ApplicationContext ctx = new SpringApplicationBuilder(SolrIndexerApplication.class).web(false).run(args);
// ApplicationContext ctx = SpringApplicationBuilder.run(SolrIndexerApplication.class, args);
System.out.println("Application executed successfully!");
SpringApplication.exit(ctx);
}
use of org.springframework.boot.builder.SpringApplicationBuilder 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);
}
}
use of org.springframework.boot.builder.SpringApplicationBuilder 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!");
}
Aggregations