add NetUtil.isopen

This commit is contained in:
Looly
2020-04-19 09:38:17 +08:00
parent eaf1938433
commit f4fc97f9de
5 changed files with 56 additions and 6 deletions

View File

@@ -0,0 +1,17 @@
package cn.hutool.http.server;
import cn.hutool.core.swing.DesktopUtil;
import cn.hutool.http.HttpUtil;
public class DocServerTest {
public static void main(String[] args) {
HttpUtil.createServer(80)
// 设置默认根目录,
.setRoot("D:\\workspace\\site\\hutool-site")
// 返回JSON数据测试
.start();
DesktopUtil.browse("http://localhost/");
}
}