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
-1
View File
@@ -527,7 +527,6 @@ class Router extends HttpService implements RouterInterface
/**
* @param $exception
* @return mixed
* @throws ComponentException
* @throws Exception
*/
private function exception($exception): mixed
+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);
});
}