use of io.jpom.service.h2db.BaseNodeService in project Jpom by dromara.
the class InitDb method loadJsonToDb.
private static void loadJsonToDb() {
/*
@author Hotstrip
@date 2021-08-03
load build.js data to DB
*/
LoadBuildJsonToDB.getInstance().doJsonToSql();
// @author bwcx_jzy @date 2021-12-02
LoadJsonConfigToDb instance = LoadJsonConfigToDb.getInstance();
// init workspace
WorkspaceService workspaceService = SpringUtil.getBean(WorkspaceService.class);
try {
BaseServerController.resetInfo(UserModel.EMPTY);
//
instance.loadIpConfig();
instance.loadMailConfig();
instance.loadOutGivingWhitelistConfig();
//
instance.loadUserInfo();
workspaceService.checkInitDefault();
//
instance.loadNodeInfo();
instance.loadSshInfo();
instance.loadMonitorInfo();
instance.loadOutgivinInfo();
} finally {
BaseServerController.removeEmpty();
}
//
workspaceService.convertNullWorkspaceId();
instance.convertMonitorLogField();
// 同步项目
Map<String, BaseNodeService> beansOfType = SpringUtil.getApplicationContext().getBeansOfType(BaseNodeService.class);
for (BaseNodeService<?> value : beansOfType.values()) {
value.syncAllNode();
}
//
Map<String, BaseGroupService> groupServiceMap = SpringUtil.getApplicationContext().getBeansOfType(BaseGroupService.class);
for (BaseGroupService<?> value : groupServiceMap.values()) {
value.repairGroupFiled();
}
}
Aggregations