代码比较简单
//扫描所有的配置类
ClassPathScanningCandidateComponentProvider provider = new ClassPathScanningCandidateComponentProvider(false); // 不使用默认的TypeFilter
provider.addIncludeFilter(new AnnotationTypeFilter(Form.class));
Set<BeanDefinition> beanDefinitionSet = provider.findCandidateComponents("com.test.package");
for (BeanDefinition beanDefinition : beanDefinitionSet) {
String beanClassName = beanDefinition.getBeanClassName();
Class<?> formClass = Class.forName(beanClassName);
FORM_MAP.putIfAbsent(formClass, FormUtils.getFormInfo(formClass));
}