ARTICLE · INTELLIGENCE

战地情报 · 详情页

来自尧图项目组的一线实战观察与深度解析

BmcWeb:app.run

BmcWeb:app.run 1.导入持久化数据persistent_data::getConfig(); inline ConfigFile getConfig() { static ConfigFile f; return f; } class ConfigFile { uint64_t jsonRevision = 1; public: // todo(ed) should read this from a fixed location somewhere, not CWD static constexpr const char* filename = "bmcweb_persistent_data.json"; ConfigFile() { readData(); } void readData() { ... } };从~/bmcweb_persistent_data.json 读取持久化数据2.导入各种路由int run() { ... if constexpr (BMCWEB_REDFISH) { redfish::RedfishService::getInstance(app); // Create EventServiceManager instance and initialize Config red
RELATED READING

延伸阅读

更多一线实战笔记与深度复盘,助您持续精进