@Override
public void start() throws Exception {
try{
vertx.createHttpServer()
.requestHandler(req -> req.response().end("hello"))
.listen(8080)
.connectionHandler( r-> {
System.out.println(r.remoteAddress());
})
.close( r -> {
System.out.println("closed");
});
}catch (Exception e){
//e.printStackTrace();
System.out.println("eeee");
}
}
我想捕获 java.net.BindException: Address already in use: bind 该怎么写。
添加回答
举报
0/150
提交
取消