/**
* Configuration interface to be implemented by most bean factories. Provides 大多数 bean 工厂所实现的配置接口
* facilities to configure a bean factory, in addition to the bean factory 除了接口 facilities 的方法以外,还提供配置一个 bean factory 的工具,
* client methods in the {@link org.springframework.beans.factory.BeanFactory}
* interface.
*
* <p>This bean factory interface is not meant to be used in normal application 这个 bean factory 接口不用于通常的 application 代码
* code: Stick to {@link org.springframework.beans.factory.BeanFactory} or 对于典型的需求请使用 BeanFactory 或 ListableBeanFactory
* {@link org.springframework.beans.factory.ListableBeanFactory} for typical
* needs. This extended interface is just meant to allow for framework-internal 这个扩展的接口仅是为了扩展框架内部的插件即插即用
* plug'n'play and for special access to bean factory configuration methods. 和对 bean factory 配置方法的特殊访问
*
* @author Juergen Hoeller
* @since 03.11.2003
* @see org.springframework.beans.factory.BeanFactory
* @see org.springframework.beans.factory.ListableBeanFactory
* @see ConfigurableListableBeanFactory
*/
/**
* setBeanClassLoader 类加载器
* setTempClassLoader 临时类加载器
* setCacheBeanMetadata 设置是否缓存 bean 元数据
* setBeanExpressionResolver 设置 bean 表达式解析器
* setConversionService 设置转换服务,用于 bean 属性值的转换
* addPropertyEditorRegistrar 添加属性编辑注册器
* setTypeConverter 设置类型转换器
* addEmbeddedValueResolver 添加嵌入式值解析器
* addBeanPostProcessor 添加 bean 后置处理器
* registerScope 注册生命周期
*/
public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, SingletonBeanRegistry {
/**
* Scope identifier for the standard singleton scope: "singleton". 标准单例的单例作用域标示符
* Custom scopes can be added via {@code registerScope}. 可以通过 registerScope 自定义添加作用域
* @see #registerScope
*/
String SCOPE_SINGLETON = "singleton";
/**
* Scope identifier for the standard prototype scope: "prototype". 标准原型范围的范围标示符
* Custom scopes can be added via {@code registerScope}. 可以通过 registerScope 自定义添加作用域
* @see #registerScope
*/
String SCOPE_PROTOTYPE = "prototype";
}
Spring源码-ConfigurableBeanFactory-源码解读
最新推荐文章于 2022-03-20 17:52:08 发布