开发者社区> 问答> 正文

refreshContext断点如何执行

refreshContext断点如何执行

展开
收起
游客pklijor6gytpx 2019-11-18 16:03:12 1150 0
1 条回答
写回答
取消 提交回答
  •     public void refresh() throws BeansException, IllegalStateException {
            synchronized (this.startupShutdownMonitor) {
                // Prepare this context for refreshing.
                prepareRefresh();
     
                // Tell the subclass to refresh the internal bean factory.
                ConfigurableListableBeanFactory beanFactory = obtainFreshBeanFactory();
     
                // Prepare the bean factory for use in this context.
                prepareBeanFactory(beanFactory);
     
                try {
                    // Allows post-processing of the bean factory in context subclasses.
                    postProcessBeanFactory(beanFactory);
     
                    // Invoke factory processors registered as beans in the context.
                    invokeBeanFactoryPostProcessors(beanFactory);
     
                    // Register bean processors that intercept bean creation.
                    registerBeanPostProcessors(beanFactory);
     
                    // Initialize message source for this context.
                    initMessageSource();
     
                    // Initialize event multicaster for this context.
                    initApplicationEventMulticaster();
     
                    // Initialize other special beans in specific context subclasses.
                    onRefresh();
     
                    // Check for listener beans and register them.
                    registerListeners();
     
                    // Instantiate all remaining (non-lazy-init) singletons.
                    finishBeanFactoryInitialization(beanFactory);
     
                    // Last step: publish corresponding event.
                    finishRefresh();
                }
    
    2019-11-18 16:03:31
    赞同 展开评论 打赏
问答地址:
问答排行榜
最热
最新

相关电子书

更多
低代码开发师(初级)实战教程 立即下载
冬季实战营第三期:MySQL数据库进阶实战 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载