Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,10 @@ default Map<String, Object> getPolaris() {
return null;
}

/**
* Get consul.
*/
default Map<String, String> getConsul() {
return null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ public class BootstrapConfigProperties implements BootstrapPropertiesInterface {
*/
private Map<String, Object> polaris;

/**
* Consul config
*/
private Map<String, String> consul;

/**
* Web config
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,16 @@ public BeforeCheckConfiguration.BeforeCheck dynamicThreadPoolBeforeCheckBean(@Au
"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;
}
default:
Expand Down