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(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) { SpringApplication springApplication = new SpringApplication(Application.class); springApplication.addListeners(new ApplicationPidFileWriter("app.pid")); springApplication.addListeners(new EmbeddedServerPortFileWriter("app.port")); springApplication.run(args); }
@Override public void configure(SpringApplicationBuilder builder) { builder.listeners(new EmbeddedServerPortFileWriter()).web(true); }
public static void main(String[] args) throws Exception { SpringApplication springApplication = new SpringApplication(SampleWebUiApplication.class); springApplication.addListeners(new ApplicationPidFileWriter(), new EmbeddedServerPortFileWriter()); springApplication.run(args); }