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
  • Loading branch information
gsmet authored and danielsoro committed Sep 20, 2024
1 parent eaae8ff commit ab2e936
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 ab2e936

Please sign in to comment.