List of usage examples for org.springframework.http.server.reactive.bootstrap HttpServer setPort
void setPort(int port);
From source file:playground.app.Application.java
public static void main(String[] args) throws Exception { HttpHandler httpHandler = createHttpHandler(); HttpServer server = new TomcatHttpServer(); server.setPort(8080); server.setHandler(httpHandler);/*from ww w . j av a 2s. c om*/ server.afterPropertiesSet(); server.start(); CompletableFuture<Void> stop = new CompletableFuture<>(); Runtime.getRuntime().addShutdownHook(new Thread(() -> { stop.complete(null); })); synchronized (stop) { stop.wait(); } }