mirror of
https://github.com/wahyd4/Martian.git
synced 2026-08-08 21:06:40 +10:00
删除垃圾代码
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user