spring 获取对象的注解

BeanDefinition definition = registry.getBeanDefinition(name);
if (definition instanceof AnnotatedBeanDefinition) {
  AnnotatedBeanDefinition annotatedDefinition = (AnnotatedBeanDefinition) definition;
  addComponentScanningPackages(packages, annotatedDefinition.getMetadata());
}
上一篇:内嵌的Component调用外部的方法


下一篇:linux挂载新磁盘、分区和开机自动挂载