mirror of
https://github.com/wahyd4/Martian.git
synced 2026-08-09 05:16:21 +10:00
去除tomcat,不再使用第三方容器,而是直接采用jdk自带的HttpServer来做http服务
This commit is contained in:
@@ -2,7 +2,6 @@ package com.mars.mvc.resolve;
|
||||
|
||||
import com.mars.common.constant.MarsConstant;
|
||||
import com.mars.common.constant.MarsSpace;
|
||||
import com.mars.tomcat.execute.access.PathAccess;
|
||||
import com.mars.server.server.request.HttpMarsRequest;
|
||||
import com.mars.server.server.request.HttpMarsResponse;
|
||||
import com.mars.server.util.RequestUtil;
|
||||
|
||||
@@ -45,7 +45,7 @@ public class MarsServer {
|
||||
//启动服务器
|
||||
httpServer.start();
|
||||
} catch (Exception e) {
|
||||
log.error("启动tomcat报错",e);
|
||||
log.error("启动iServer报错",e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ import java.net.InetSocketAddress;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* 请求对象,对原生tomcat的request的补充
|
||||
* 请求对象
|
||||
* @author yuye
|
||||
*
|
||||
*/
|
||||
@@ -45,7 +45,7 @@ public class HttpMarsRequest {
|
||||
}
|
||||
|
||||
/**
|
||||
* 上传文件时添加参数
|
||||
* 设置参数
|
||||
* @param params
|
||||
*/
|
||||
public void setParams(Map<String, List<String>> params) {
|
||||
@@ -154,7 +154,7 @@ public class HttpMarsRequest {
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取tomcat原生request
|
||||
* 获取java原生request
|
||||
* @return 原生请求对象
|
||||
*/
|
||||
public HttpExchange getHttpExchange() {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class BaseStartMars {
|
||||
/* 加载框架数据 */
|
||||
StartLoad.load(initJdbc,clazz,startList);
|
||||
|
||||
/* 启动tomcat */
|
||||
/* 启动iServer */
|
||||
MarsServer.start(getPort());
|
||||
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user