diff --git a/HttpServer/Server.php b/HttpServer/Server.php index 49dff73f..95ef2d99 100644 --- a/HttpServer/Server.php +++ b/HttpServer/Server.php @@ -470,7 +470,7 @@ class Server extends HttpService $handler = $alias['handler']; foreach ($alias['attributes'] as $key => $attribute) { if ($attribute instanceof IAnnotation) { - $attribute->setHandler($handler); + $attribute->execute($handler); } } } @@ -496,7 +496,7 @@ class Server extends HttpService $handler = $alias['handler']; foreach ($alias['attributes'] as $key => $attribute) { if ($attribute instanceof IAnnotation) { - $attribute->setHandler($handler); + $attribute->execute($handler); } } } diff --git a/System/Application.php b/System/Application.php index 17ce108e..6aadcb7a 100644 --- a/System/Application.php +++ b/System/Application.php @@ -134,13 +134,13 @@ class Application extends BaseApplication public function scan_system_annotation() { $annotation = Snowflake::app()->getAttributes(); - $annotation->readControllers(__DIR__ . '/../Console', 'Console', 'system'); - $annotation->readControllers(__DIR__ . '/../Database', 'Database', 'system'); - $annotation->readControllers(__DIR__ . '/../Gii', 'Gii', 'system'); - $annotation->readControllers(__DIR__ . '/../HttpServer', 'HttpServer', 'system'); - $annotation->readControllers(__DIR__ . '/../Kafka', 'Kafka', 'system'); - $annotation->readControllers(__DIR__ . '/../System', 'Snowflake', 'system'); - $annotation->readControllers(__DIR__ . '/../Validator', 'Validator', 'system'); + $annotation->readControllers(__DIR__ . '/../Console/', 'Console', 'system'); + $annotation->readControllers(__DIR__ . '/../Database/', 'Database', 'system'); + $annotation->readControllers(__DIR__ . '/../Gii/', 'Gii', 'system'); + $annotation->readControllers(__DIR__ . '/../HttpServer/', 'HttpServer', 'system'); + $annotation->readControllers(__DIR__ . '/../Kafka/', 'Kafka', 'system'); + $annotation->readControllers(__DIR__ . '/../System/', 'Snowflake', 'system'); + $annotation->readControllers(__DIR__ . '/../Validator/', 'Validator', 'system'); }