update trantor
This commit is contained in:
parent
72b2a60b53
commit
cb08150d87
|
@ -47,7 +47,7 @@ int main()
|
|||
//drogon::DrObjectBase *p=drogon::DrClassMap::newObject("HHH");
|
||||
//TestController haha;
|
||||
//std::cout<<haha.good()<<std::endl;
|
||||
HHH hh;
|
||||
|
||||
std::cout<<banner<<std::endl;
|
||||
drogon::HttpAppFramework::instance().setListening("0.0.0.0",12345);
|
||||
trantor::Logger::setLogLevel(trantor::Logger::TRACE);
|
||||
|
|
|
@ -27,25 +27,27 @@ namespace drogon
|
|||
class HttpSimpleController:public DrObject<T>,public HttpSimpleControllerBase
|
||||
{
|
||||
public:
|
||||
HttpSimpleController(){}
|
||||
|
||||
virtual ~HttpSimpleController(){}
|
||||
|
||||
protected:
|
||||
|
||||
HttpSimpleController(){}
|
||||
|
||||
private:
|
||||
//virtual std::vector<std::string> paths()=0;
|
||||
|
||||
class pathRegister {
|
||||
public:
|
||||
pathRegister(){
|
||||
std::cout<<"pathRegister!!"<<HttpSimpleController<T>::classTypeName()<<std::endl;
|
||||
// _register("hahaha",{std::string((char *)PATH)...});
|
||||
// auto ctl= static_cast<HttpSimpleController<T>*>(new T);
|
||||
pathRegister()
|
||||
{
|
||||
auto vPaths=T::paths();
|
||||
//delete ctl;
|
||||
|
||||
for(auto path:vPaths)
|
||||
{
|
||||
LOG_DEBUG<<"register simple controller("<<HttpSimpleController<T>::classTypeName()<<") on path:"<<path;
|
||||
HttpAppFramework::instance().registerHttpSimpleController(path,HttpSimpleController<T>::classTypeName());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
protected:
|
||||
|
|
2
trantor
2
trantor
|
@ -1 +1 @@
|
|||
Subproject commit caf2c2b989961560dbd8fa75f09d34009c1319b3
|
||||
Subproject commit 3dfefc817dc9c181ed68ced3f4eafbf7df09b9fb
|
Loading…
Reference in New Issue