美文网首页
01_刷新前的预处理

01_刷新前的预处理

作者: steamed_bun | 来源:发表于2020-01-08 17:24 被阅读0次

\underline{spring容器刷新第一步}查看全部
//Prepare this context for refreshing.刷新前的预处理
prepareRefresh();

  1. 初始化一些属性设置
// Initialize any placeholder property sources in the context environment
initPropertySources();

注:此方法是空的,留给子方法实现

  1. 验证所欲的属性都是合法的
// Validate that all properties marked as required are resolvable
getEnvironment().validateRequiredProperties();
  1. 保存早期的事件,一旦多播器可用就会发布
// Allow for the collection of early ApplicationEvents,
// to be published once the multicaster is available...
this.earlyApplicationEvents = new LinkedHashSet<ApplicationEvent>();

相关文章

网友评论

      本文标题:01_刷新前的预处理

      本文链接:https://www.haomeiwen.com/subject/wywractx.html