From 04ad150bbad6cc2f6d31fa9c0e5f68ac63b0c034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mr=C2=B7x?= Date: Fri, 5 Mar 2021 17:05:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- HttpServer/Server.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/HttpServer/Server.php b/HttpServer/Server.php index a738f922..4b9dd305 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -463,13 +463,10 @@ class Server extends HttpService { $event = Snowflake::app()->getEvent(); $event->on(Event::SERVER_WORKER_START, function () { + router()->loadRouterSetting(); + $annotation = Snowflake::app()->getAttributes(); - - $router = Snowflake::app()->getRouter(); - $annotation->instanceDirectoryFiles(CONTROLLER_PATH); - - $router->loadRouterSetting(); }); }