sourcecode: createBootstrapContext()

private DefaultBootstrapContext createBootstrapContext() {
    DefaultBootstrapContext bootstrapContext = new DefaultBootstrapContext();//创建 DefaultBootstrapContext实例 ->
    this.bootstrapRegistryInitializers.forEach((initializer) -> { //todo
        initializer.initialize(bootstrapContext);
    });
    return bootstrapContext;
}

DefaultBootstrapContext  bootstrapContext 属性:

Map<Class<?>, InstanceSupplier<?>> instanceSuppliers = new HashMap(); //存储类对应的实例生成方式? todo
Map<Class<?>, Object> instances = new HashMap();//存储类对应的实例?todo
ApplicationEventMulticaster events = new SimpleApplicationEventMulticaster();//事件广播? todo

上一篇:todo sourcecode


下一篇:学习TypeScrip4(数组类型)