Java-2136 Correctly configure netty server

This commit is contained in:
mikr
2020-09-15 11:08:35 +02:00
parent d553e24995
commit 94a0a60ee7

View File

@@ -28,9 +28,7 @@ public class SpringSecurity5Application {
HttpHandler handler = WebHttpHandlerBuilder.applicationContext(context)
.build();
ReactorHttpHandlerAdapter adapter = new ReactorHttpHandlerAdapter(handler);
HttpServer httpServer = HttpServer.create();
httpServer.host("localhost");
httpServer.port(8080);
HttpServer httpServer = HttpServer.create().host("localhost").port(8080);
return httpServer.handle(adapter).bindNow();
}