add Middleware and release version 1.1.0

This commit is contained in:
whale
2020-03-29 16:29:02 +08:00
parent c2fcdf9668
commit 9a28126765
11 changed files with 175 additions and 21 deletions

View File

@@ -6,6 +6,7 @@ namespace Module\Example;
use Framework\Console;
use ZM\Annotation\CQ\CQCommand;
use ZM\Annotation\Http\Middleware;
use ZM\Annotation\Http\RequestMapping;
use ZM\Annotation\Swoole\SwooleEventAt;
use ZM\Connection\CQConnection;
@@ -33,6 +34,7 @@ class Hello extends ModBase
/**
* @RequestMapping("/test/ping")
* @Middleware("timer")
*/
public function pong(){
return "pong";
@@ -45,4 +47,4 @@ class Hello extends ModBase
Console::info("Unknown connection , I will close it.");
$this->connection->close();
}
}
}