Spring是实现自己的方式来扫描包中的类,还是使用像“反射”这样的外部库?
https://github.com/ronmamo/reflections
发布于 2020-12-13 07:23:53
两者都有。它们使用ASM读取类文件,但使用自己的MetadataReader,因此可以提供比Java提供的更灵活的批注继承模型(在普通的Java中,批注只从超类继承)。在Spring中,它们也是从超级接口和meta annotations继承的。
MetadataReader
https://stackoverflow.com/questions/65270703
相似问题