0

我有一个应用程序可以从基本包和代理中扫描带注释的接口,然后注册为 bean。(类似于 spring-data 存储库)

@FooAnnotation
public interface Bar {

}

...

Set<Class<?>> collect = new Reflections("com.example")
                             .getTypesAnnotatedWith(FooAnnotation.class);

// do some proxies

这在没有 spring-native 环境的情况下有效,但是在 spring-native 中,我找不到类。

好吧,我发现我无法获得课程资源。有没有办法扫描我的包类并对其进行迭代?正如 Spring Component Scan 所做的那样。

4

0 回答 0