This commit is contained in:
2021-04-02 18:40:50 +08:00
parent 98986ffe9d
commit bdd9f4008f
7 changed files with 40 additions and 43 deletions
+4 -7
View File
@@ -493,14 +493,11 @@ class Server extends HttpService
{
$event = Snowflake::app()->getEvent();
$event->on(Event::SERVER_WORKER_START, function () {
try {
router()->loadRouterSetting();
$system = Snowflake::app();
$annotation = Snowflake::app()->getAttributes();
$annotation->instanceDirectoryFiles(APP_PATH);
} catch (\Throwable $exception) {
$this->addError($exception, 'throwable');
}
$system->getRouter()->loadRouterSetting();
$system->getAnnotation()->instanceDirectoryFiles(APP_PATH);
});
}