删除垃圾代码

This commit is contained in:
yuye
2020-05-28 13:29:19 +08:00
parent 6b7f1176cf
commit 492d04173e
@@ -15,11 +15,6 @@ import org.slf4j.LoggerFactory;
public class MarsServer {
private static Logger log = LoggerFactory.getLogger(MarsServer.class);
/**
* 获取全局存储空间
*/
private static MarsSpace constants = MarsSpace.getEasySpace();
/**
* 启动tomcat服务
@@ -31,7 +26,7 @@ public class MarsServer {
tomcat.setPort(portNumber);
tomcat.setBaseDir(".");
final Context context = tomcat.addContext("/", null);
Context context = tomcat.addContext("/", null);
Tomcat.addServlet(context, "dispatcher", new MarsServerHandler());
context.addServletMappingDecoded("/*", "dispatcher");
@@ -39,11 +34,10 @@ public class MarsServer {
tomcat.start();
/* 标识tomcat是否已经启动 */
constants.setAttr(MarsConstant.HAS_NETTY_START,"yes");
MarsSpace.getEasySpace().setAttr(MarsConstant.HAS_NETTY_START,"yes");
log.info("启动成功");
tomcat.getServer().await();
} catch (Exception e) {
log.error("启动tomcat报错",e);
}