This commit is contained in:
2021-09-18 17:00:21 +08:00
parent d8685786c6
commit c2dccc68b9
+4 -4
View File
@@ -98,11 +98,11 @@ class OnWorkerStart implements EventDispatcherInterface
{ {
$di = Kiri::getDi(); $di = Kiri::getDi();
$namespace = array_filter(explode('\\', Router::getNamespace())); // $namespace = array_filter(explode('\\', Router::getNamespace()));
//
// $namespace = APP_PATH . implode('/', $namespace);
$namespace = APP_PATH . implode('/', $namespace); $this->annotation->read(APP_PATH . 'app', 'App');
$this->annotation->read(APP_PATH . 'app', 'App', $isWorker ? [] : [$namespace]);
$fileLists = $this->annotation->read(APP_PATH . 'app'); $fileLists = $this->annotation->read(APP_PATH . 'app');
foreach ($fileLists->runtime(APP_PATH . 'app') as $class) { foreach ($fileLists->runtime(APP_PATH . 'app') as $class) {