public static void main(String[] args) throws Exception { /** * Common */ ConfigurableApplicationContext commonContext = new SpringApplicationBuilder(ApolloApplication.class).web(false).run(args); commonContext.addApplicationListener(new ApplicationPidFileWriter()); logger.info(commonContext.getId() + " isActive: " + commonContext.isActive()); /** * ConfigService */ if (commonContext.getEnvironment().containsProperty("configservice")) { ConfigurableApplicationContext configContext = new SpringApplicationBuilder(ConfigServiceApplication.class).parent(commonContext) .sources(RefreshScope.class).run(args); logger.info(configContext.getId() + " isActive: " + configContext.isActive()); } /** * AdminService */ if (commonContext.getEnvironment().containsProperty("adminservice")) { ConfigurableApplicationContext adminContext = new SpringApplicationBuilder(AdminServiceApplication.class).parent(commonContext) .sources(RefreshScope.class).run(args); logger.info(adminContext.getId() + " isActive: " + adminContext.isActive()); } /** * Portal */ if (commonContext.getEnvironment().containsProperty("portal")) { ConfigurableApplicationContext portalContext = new SpringApplicationBuilder(PortalApplication.class).parent(commonContext) .sources(RefreshScope.class).run(args); logger.info(portalContext.getId() + " isActive: " + portalContext.isActive()); } }
public static void main(String[] args) throws Exception { /** * Common */ ConfigurableApplicationContext commonContext = new SpringApplicationBuilder(ApolloApplication.class).web(false).run(args); commonContext.addApplicationListener(new ApplicationPidFileWriter()); logger.info(commonContext.getId() + " isActive: " + commonContext.isActive()); /** * ConfigService */ if (commonContext.getEnvironment().containsProperty("configservice")) { ConfigurableApplicationContext configContext = new SpringApplicationBuilder(ConfigServiceApplication.class).parent(commonContext) .sources(RefreshScope.class).run(args); logger.info(configContext.getId() + " isActive: " + configContext.isActive()); } /** * AdminService */ if (commonContext.getEnvironment().containsProperty("adminservice")) { ConfigurableApplicationContext adminContext = new SpringApplicationBuilder(AdminServiceApplication.class).parent(commonContext) .sources(RefreshScope.class).run(args); logger.info(adminContext.getId() + " isActive: " + adminContext.isActive()); } /** * Portal */ if (commonContext.getEnvironment().containsProperty("portal")) { ConfigurableApplicationContext portalContext = new SpringApplicationBuilder(PortalApplication.class).parent(commonContext).run(args); logger.info(portalContext.getId() + " isActive: " + portalContext.isActive()); } }
public static void main(String[] args) throws Exception { LOGGER.info("Starting Server!"); SpringApplication app = new SpringApplication(Main.class); app.addListeners(new ApplicationPidFileWriter()); ApplicationContext ctx = app.run(args); }
public static void main(String[] args) throws Exception { //SpringApplication.run(Application.class, args); SpringApplication springApplication = new SpringApplication(Application.class); springApplication.addListeners( new ApplicationPidFileWriter() ); springApplication.run(args); }
public static void main(String[] args) { SpringApplication springApplication = new SpringApplication(Application.class); springApplication.setWebEnvironment(true); springApplication.addListeners(new ApplicationPidFileWriter("app.pid")); springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port")); springApplication.run(args); }
public static void main(final String... args) { final ApplicationPidFileWriter pidFileWriter = new ApplicationPidFileWriter(); pidFileWriter.setTriggerEventType(ApplicationEnvironmentPreparedEvent.class); final SpringApplication application = new SpringApplication(PrototypeApplication.class); application.setHeadless(true); application.setRegisterShutdownHook(true); application.setLogStartupInfo(false); application.setWebEnvironment(true); application.addListeners(pidFileWriter); application.run(args); LOG.info("Prototype launched [OK]"); }
public static void main(String[] args) throws Exception { ConfigurableApplicationContext context = SpringApplication.run(PortalApplication.class, args); context.addApplicationListener(new ApplicationPidFileWriter()); context.addApplicationListener(new EmbeddedServerPortFileWriter()); }
public static void main(String[] args) { ConfigurableApplicationContext context = new SpringApplicationBuilder(AdminServiceApplication.class).run(args); context.addApplicationListener(new ApplicationPidFileWriter()); context.addApplicationListener(new EmbeddedServerPortFileWriter()); }
public static void main(String[] args) throws Exception { ConfigurableApplicationContext context = new SpringApplicationBuilder(ConfigServiceApplication.class).run(args); context.addApplicationListener(new ApplicationPidFileWriter()); context.addApplicationListener(new EmbeddedServerPortFileWriter()); }
public static void main(String[] args) { final SpringApplication springApplication = new SpringApplication(DemoApplication.class); springApplication.addListeners(new ApplicationPidFileWriter("demo.pid")); springApplication.run(args); }
public static void main(String[] args) throws IOException { SpringApplication springApplication = new SpringApplication(Application.class); springApplication.addListeners(new ApplicationPidFileWriter("application.pid")); springApplication.run(args); }
public static void main(String[] args) { SpringApplication springApplication = new SpringApplication(Application.class); springApplication.addListeners(new ApplicationPidFileWriter(APPLICATION_PID)); springApplication.run(args); }
public static void main(String[] args) { new SpringApplicationBuilder() .listeners(new ApplicationPidFileWriter()) .sources(JandyApplicationServer.class) .run(args); }
public static void main(String[] args) { SpringApplication springApplication = new SpringApplication(Application.class); springApplication.addListeners(new ApplicationPidFileWriter("app.pid")); springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port")); springApplication.run(args); }
public static void main(String[] args) { SpringApplication app = new SpringApplication(Application.class); app.addListeners(new ApplicationPidFileWriter()); app.run(args); }
public static void main(String[] args) throws Exception { SpringApplication springApplication = new SpringApplication(SampleWebUiApplication.class); springApplication.addListeners(new ApplicationPidFileWriter(), new EmbeddedServerPortFileWriter()); springApplication.run(args); }
public static void main(final String[] args) { SpringApplication springApplication = new SpringApplication(Application.class); springApplication.addListeners(new ApplicationPidFileWriter("openlrs.pid")); springApplication.run(args); }