diff --git a/HttpServer/Server.php b/HttpServer/Server.php index c2905f0a..f1b00341 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -202,6 +202,10 @@ class Server extends Application */ public function onProcessListener(): void { + $attributes = Snowflake::app()->getAttributes(); + $attributes->readControllers(CONTROLLER_PATH, 'App\Http\Controllers', 'controllers'); + $attributes->readControllers(SOCKET_PATH, 'App\Websocket', 'sockets'); + if (!($this->baseServer instanceof \Swoole\Server)) { return; }