Skip to content

Commit

Permalink
fix(plugin): include ancestors when loading Spring custom plugin (dat…
Browse files Browse the repository at this point in the history
  • Loading branch information
david-leifker authored Jul 1, 2024
1 parent 8edc94d commit ae4ca4b
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.BeanFactoryUtils;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

Expand Down Expand Up @@ -109,7 +110,9 @@ protected <T extends PluginSpec> List<T> build(
final List<T> plugins;
if (config.getSpring().getName() == null) {
plugins =
springApplicationContext.getBeansOfType(clazz).values().stream()
BeanFactoryUtils.beansOfTypeIncludingAncestors(springApplicationContext, clazz)
.values()
.stream()
.map(plugin -> (T) plugin)
.collect(Collectors.toList());
} else {
Expand Down

0 comments on commit ae4ca4b

Please sign in to comment.