去除tomcat,不再使用第三方容器,而是直接采用jdk自带的HttpServer来做http服务

This commit is contained in:
yuye
2020-06-07 16:46:05 +08:00
parent daeb98d3af
commit d311371ffd
4 changed files with 6 additions and 6 deletions
@@ -18,9 +18,9 @@ public class MarsConstant {
*/
public static final String HAS_START="hasStart";
/**
* 记录netty是否已经启动了
* 记录服务是否已经启动了
*/
public static final String HAS_NETTY_START="hasNettyStart";
public static final String HAS_SERVER_START ="hasNettyStart";
/**
* 记录是否已经启动过单测了
*/
@@ -60,7 +60,7 @@ public class ExecuteMarsTimer {
*/
private static void executeTimer(MarsTimerModel marsTimerModel){
try {
Object hasNettyStart = constants.getAttr(MarsConstant.HAS_NETTY_START);
Object hasNettyStart = constants.getAttr(MarsConstant.HAS_SERVER_START);
if(hasNettyStart != null){
Object beanObject = marsTimerModel.getObj();
Method method = marsTimerModel.getMethod();
@@ -38,8 +38,8 @@ public class MarsServer {
//设置服务器的线程池对象
httpServer.setExecutor(ThreadPool.getThreadPoolExecutor());
/* 标识tomcat是否已经启动 */
MarsSpace.getEasySpace().setAttr(MarsConstant.HAS_NETTY_START,"yes");
/* 标识服务是否已经启动 */
MarsSpace.getEasySpace().setAttr(MarsConstant.HAS_SERVER_START,"yes");
log.info("启动成功");
//启动服务器
@@ -48,7 +48,7 @@ public class MarsJunitStart {
autoWrite(obj);
/* 标识是否已经启动 */
constants.setAttr(MarsConstant.HAS_NETTY_START,"yes");
constants.setAttr(MarsConstant.HAS_SERVER_START,"yes");
log.info("开始执行单测......");
} catch (Exception e) {