Spring源码-ConfigurableBeanFactory-源码解读

/**
 * 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";
}
  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值