public HttpServer<ByteBuf, ByteBuf> createServer() {
try {
final String ideBasePath = new File(".").getCanonicalPath();
final File rootDirectory;
if (ideBasePath.contains(rootDir)) {
// for eclipse
rootDirectory = new File(".");
} else {
// for intellij
rootDirectory = new File(rootDir);
}
return RxNetty.createHttpServer(port,
RequestHandlerWithErrorMapper.from(
new LocalDirectoryRequestHandler(rootDirectory),
new FileErrorResponseMapper()));
} catch (IOException e) {
throw new RuntimeException(e);
}
}
StaticServer.java 文件源码
java
阅读 27
收藏 0
点赞 0
评论 0
项目:MarketData
作者:
评论列表
文章目录