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