this.systemLogger = systemLogger;
this.restController = restController;
this.api = api;
registerHttpStartProcessor(new DefaultHttpStartProcessor());
registerHttpFinishProcessor(new DefaultHttpFinishProcessor());
Environment environment = new Environment(settings);
disableMysql = settings.getAsBoolean(ServiceFramwork.mode + ".datasources.mysql.disable", false);
server = new Server();
SelectChannelConnector connector = new SelectChannelConnector();
QueuedThreadPool threadPool = new QueuedThreadPool();
threadPool.setMinThreads(settings.getAsInt("http.threads.min", 100));
threadPool.setMaxThreads(settings.getAsInt("http.threads.max", 1000));
connector.setThreadPool(threadPool);
connector.setPort(settings.getAsInt("http.port", 8080));
server.addConnector(connector);
HandlerList handlers = new HandlerList();
if (settings.getAsBoolean("application.static.enable", false)) {
ResourceHandler resource_handler = new ResourceHandler();
resource_handler.setDirectoriesListed(false);
try {
resource_handler.setBaseResource(Resource.newResource(environment.templateDirFile().getPath() + "/assets/"));
} catch (IOException e) {
e.printStackTrace();
}
if (settings.getAsBoolean("application.session.enable", false)) {
SessionManager sessionManager = new HashSessionManager();