public class TestRegistrar implements BeanFactoryAware, ImportBeanDefinitionRegistrar, EnvironmentAware {
private Environment environment;
private BeanFactory beanFactory;
private BeanDefinitionRegistry registry;
@
Override public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
//空指针异常
FastDelayQueueContext fastDelayQueueContext = beanFactory.getBean(FastDelayQueueContext.class);
}
FastDelayQueueContext 是由 spring boot tarter 注册加载的,在 registerBeanDefinitions 方法中 有没有方式获取到