You should create the server as follows:
HttpServer.create()
.host("0.0.0.0")
.port(8080)
.handle((req, res) -> res.sendString(Flux.just("hello")))
.bind()
.block();
The method create()
is the only one available in HttpServer
. The create with two parameters must have existed in a previous version.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…