01_刷新前的预处理

2020-01-08  本文已影响0人  steamed_bun

\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>();
上一篇 下一篇

猜你喜欢

热点阅读