pull/1532/merge
Frost 6 months ago committed by GitHub
commit b158fffa65
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -108,4 +108,10 @@ public interface BootstrapPropertiesInterface {
return null; return null;
} }
/**
* Get consul.
*/
default Map<String, String> getConsul() {
return null;
}
} }

@ -81,6 +81,11 @@ public class BootstrapConfigProperties implements BootstrapPropertiesInterface {
*/ */
private Map<String, Object> polaris; private Map<String, Object> polaris;
/**
* Consul config
*/
private Map<String, String> consul;
/** /**
* Web config * Web config
* *

@ -178,6 +178,16 @@ public class BeforeCheckConfiguration {
"Please check whether the [spring.dynamic.thread-pool.polaris.file.type] configuration is empty or an empty string."); "Please check whether the [spring.dynamic.thread-pool.polaris.file.type] configuration is empty or an empty string.");
} }
} }
Map<String, String> consul = properties.getConsul();
if (MapUtil.isNotEmpty(consul)) {
String dataKey = consul.get("data-key");
if (StringUtil.isBlank(dataKey)) {
throw new ConfigEmptyException(
"Web server maybe fail to start. The dynamic thread pool consul data-key is empty.",
"Please check whether the [spring.dynamic.thread-pool.consul.data-key] configuration is empty or an empty string.");
}
}
break; break;
} }
default: default:

Loading…
Cancel
Save