Spring 是否实现了它自己的包扫描
Does Spring implement it's own packages scan
Spring 是用自己的方式扫描包中的 class 还是使用像 'reflection':
这样的外部库
两者兼而有之。他们使用 ASM 读取 class 文件,但使用他们自己的 MetadataReader
so they can offer a more flexible inheritance model for annotations than Java offers out of the box (in plain Java, annotations are only inherited from a super class. In Spring, they are also inherited from super interfaces and meta annotations).
Spring 是用自己的方式扫描包中的 class 还是使用像 'reflection':
这样的外部库两者兼而有之。他们使用 ASM 读取 class 文件,但使用他们自己的 MetadataReader
so they can offer a more flexible inheritance model for annotations than Java offers out of the box (in plain Java, annotations are only inherited from a super class. In Spring, they are also inherited from super interfaces and meta annotations).