Skip to content

Commit

Permalink
Config Doc - Scan config groups that are outside of the module
Browse files Browse the repository at this point in the history
For traditional config roots, we also need to scan the potential config
groups that are not in this module.

Fixes quarkusio#42815

(cherry picked from commit 5464841)
  • Loading branch information
gsmet committed Aug 30, 2024
1 parent 7ced157 commit 9b0d879
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,17 @@ private void scanElement(List<ConfigAnnotationListener> listeners, DiscoveryRoot

if (resolvedType.isEnum()) {
handleEnum(listeners, resolvedType.unwrappedTypeElement());
} else if (resolvedType.isClass()) {
TypeElement unwrappedTypeElement = resolvedType.unwrappedTypeElement();
if (utils.element().isAnnotationPresent(unwrappedTypeElement, Types.ANNOTATION_CONFIG_GROUP)
&& !isConfigGroupAlreadyHandled(unwrappedTypeElement)) {
debug("Detected config group: " + resolvedType + " on field: "
+ field, clazz);

DiscoveryConfigGroup discoveryConfigGroup = applyRootListeners(
l -> l.onConfigGroup(unwrappedTypeElement));
scanElement(listeners, discoveryConfigGroup, unwrappedTypeElement);
}
}

debug("Detected enclosed field: " + field, clazz);
Expand Down

0 comments on commit 9b0d879

Please sign in to comment.