1. class MyClass:public drogon::HttpSimpleController<MyClass>
  2. public:
  3. //TestController(){}
  4. virtual void asyncHandleHttpRequest(const HttpRequestPtr &req,
  5. PATH_LIST_BEGIN
  6. PATH_ADD("/json");
  7. PATH_LIST_END
  8. };

控制器的生命周期

04.1 HttpSimpleController