Merge remote-tracking branch 'origin/master'

This commit is contained in:
CaiHQ
2025-07-15 13:38:12 +08:00

View File

@@ -91,6 +91,16 @@ public class DoipLocalSingleton {
SharableVarManager.initSharableVarManager(repoID, config); SharableVarManager.initSharableVarManager(repoID, config);
} }
} }
// 如果启动参数中添加了 doipStartPort 参数,使用该参数作为启动端口
if (otherConfigs != null && otherConfigs.isJsonObject() && otherConfigs.getAsJsonObject().has("doipStartPort") && infos.size() == 1) {
int doipStartPort = otherConfigs.getAsJsonObject().get("doipStartPort").getAsInt();
// 如果当前启动的端口和指定的端口不一致,修改启动端口
if (doipStartPort != port) {
infos.get(0).url = infos.get(0).url.replace(String.valueOf(port), String.valueOf(doipStartPort));
port = doipStartPort;
}
}
DoipServiceInfo info = new DoipServiceInfo(repoID, owner, repoType, infos); DoipServiceInfo info = new DoipServiceInfo(repoID, owner, repoType, infos);
server = new DoipServerImpl(info); server = new DoipServerImpl(info);
DOOPRequestHandler handler = ContractProcess.instance.doopRequestHandler; DOOPRequestHandler handler = ContractProcess.instance.doopRequestHandler;