feat(cli): 增加配置项的启动与否 方便关闭某些配置
This commit is contained in:
@@ -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())
|
||||
|
||||
@@ -25,6 +25,10 @@ public class ServiceInfoWrapper {
|
||||
this.arguments = SpringPropertiesEscapeHelper.escapeMapKey(serviceInfo.getArguments());
|
||||
}
|
||||
|
||||
public Boolean getEnabled() {
|
||||
return serviceInfo.getEnabled();
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user