@Override
public boolean start() {
try {
ClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(true);
scanner.addIncludeFilter(new AnnotationTypeFilter(Inventory.class));
scanner.addExcludeFilter(new AnnotationTypeFilter(Controller.class));
scanner.addExcludeFilter(new AnnotationTypeFilter(org.springframework.stereotype.Component.class));
for (String pkg : getBasePkgNames()) {
for (BeanDefinition bd : scanner.findCandidateComponents(pkg)) {
Class<?> inventoryClass = Class.forName(bd.getBeanClassName());
Inventory invat = inventoryClass.getAnnotation(Inventory.class);
Info info = new Info();
info.inventory = invat;
info.inventoryClass = inventoryClass;
inventoryMapping.put(invat.mappingVOClass(), info);
}
}
} catch (Exception e) {
throw new CloudRuntimeException(e);
}
return true;
}
InventoryFacadeImpl.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:zstack
作者:
评论列表
文章目录