feat(cli): 增加配置项的启动与否 方便关闭某些配置

This commit is contained in:
2024-02-25 22:15:06 +08:00
parent 95bff3e48d
commit 8dfc797dfa
3 changed files with 16 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ public class RunnerApplication implements ApplicationRunner {
runtimeInfo = deployInformationProperties.getRuntime();
serviceInfoList = Lists.immutable.ofAll(deployInformationProperties.getServices().entrySet())
.collect(entry -> new ServiceInfoWrapper(entry.getKey(), entry.getValue()))
.select(ServiceInfoWrapper::getEnabled)
.toSortedListBy(ServiceInfoWrapper::getOrder)
.toImmutable();
hostInfoList = Lists.immutable.ofAll(SpringPropertiesEscapeHelper.escapeMapKey(deployInformationProperties.getHosts()).entrySet())

View File

@@ -25,6 +25,10 @@ public class ServiceInfoWrapper {
this.arguments = SpringPropertiesEscapeHelper.escapeMapKey(serviceInfo.getArguments());
}
public Boolean getEnabled() {
return serviceInfo.getEnabled();
}
public String getName() {
return name;
}