Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check the required fields apollo when the Config mode starts #1452

Merged
merged 1 commit into from
Sep 7, 2023
Merged
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 @@ -86,4 +86,12 @@ default Map<String, String> getNacos() {
default Map<String, String> getEtcd() {
return null;
}

/**
* Get apollo.
*/
default Map<String, String> getApollo(){
return null;
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,16 @@ public BeforeCheckConfiguration.BeforeCheck dynamicThreadPoolBeforeCheckBean(@Au
"Please check whether the [spring.dynamic.thread-pool.etcd.key] configuration is empty or an empty string.");
}
}

Map<String, String> apollo = properties.getApollo();
if (MapUtil.isNotEmpty(apollo)) {
String namespace = apollo.get("namespace");
if (StringUtil.isBlank(namespace)) {
throw new ConfigEmptyException(
"Web server failed to start. The dynamic thread pool apollo namespace is empty.",
"Please check whether the [spring.dynamic.thread-pool.apollo.namespace] configuration is empty or an empty string.");
}
}
break;
}
default:
Expand Down